NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

Reverse Text API

POST

Invert any text block by character, word, or line.

Reverse Text transforms text by reversing characters, words, or lines with multiple reversal modes for different use cases.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/reversetext
Body
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "reversed": "dlroW olleH",
    "original": "Hello World",
    "mode": "characters",
    "length": 11
  }
}

About the Reverse Text API

A reverse text API for flipping strings backwards and reordering words or lines. Send any text and choose how it should be reversed and reorganized: character by character for backwards text, word by word to flip the order of a sentence, or line by line to turn a list upside down.

Character reversal is the classic reverse string operation used in puzzles, novelty text, palindrome tools and coding exercises. Word reversal keeps every word readable but swaps their order, which suits word games and language exercises. Line reversal flips logs, lists and CSV rows so the newest or last entry comes first without parsing anything.

Each response includes the reversed result, the original text, the mode that was applied and the length of the input, so you can display both versions side by side or log what changed. Every field is returned on every plan, including the Free plan.

How it works

Reverse Text applies one of three transformations to text, chosen with mode. The value must be characters (the default), words or lines.

In characters mode the string is split into user-perceived characters (grapheme clusters), reversed and joined, so "Hello World" becomes "dlroW olleH". Emoji, emoji sequences and letters with combining accents stay intact.

In words mode the words (runs of non-whitespace) are reversed into the original word positions, so every separator (spaces, runs of spaces, tabs, line breaks) stays exactly where it was. Punctuation stays attached to its word, so "Hello, world!" becomes "world! Hello,".

In lines mode the text is split on line feeds or Windows CRLF line endings, the lines are reversed and rejoined with the text's own line ending (CRLF if the text contains one, otherwise LF); the content of each line is unchanged.

reversed holds the result, original echoes the input and mode echoes the mode applied. length is the length of the original text in JavaScript string units, which equals the character count for plain text but counts each emoji as two. No trimming or normalization is applied in any mode. The response is the same on every plan.

What people use it for

Text Effects
Create reversed text effects for creative content and visual designs
String Manipulation
Reverse strings for data processing and algorithm testing
Content Transformation
Transform text content with different reversal modes for specific formatting needs
Data Processing
Process and reverse text data for analysis and transformation tasks

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Reverse Text

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Reverse Text API.

Read the docs →
Can I reverse word order without scrambling individual words?
Yes. You can reverse text strictly by words, which keeps the spelling of each individual word intact while inverting their order. You can also reverse character by character or line by line.
What is the maximum length of text I can process at once?
You can send up to 10,000 characters in a single request. The service will transform the entire submitted string according to the reversal mode you pick.
Can I reorder lines of text from bottom to top?
Yes. Line reversal mode changes the sequence of lines while preserving the content of each line as-is. This is useful for reordering multiline logs, transcripts, or lists.
Does the response return the original input alongside the reversed text?
Yes. Each response includes the original input string, the reversed result, and the reversal mode that was applied. This makes it simple to verify transformations or store both versions side by side.
How far does the Starter plan go for text reversals?
Starter covers 200,000 text reversals per month, which works out to about $0.15 per 1,000 calls. Each reversal consumes 1 credit. If you need to test the endpoints first, the Free plan provides 200 calls per month.

Ready to build with Reverse Text? Start with 200 free credits — one key unlocks all 406+ APIs.

Explore the catalog

406+ APIs on the same key and the same response shape.

Browse all APIs