Unicode Escape/Unescape API

POST

Encode and decode Unicode escape sequences without breaking emojis.

Unicode Escape/Unescape converts text into Unicode escape sequences or restores escaped strings back into readable characters. Send any string to get the transformed text and total character count.

Try it — live request, no key required

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

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

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "action": "escape",
    "original": "Hello World",
    "escaped": "\\u0048\\u0065\\u006C\\u006C\\u006F\\u0020\\u0057\\u006F\\u0072\\u006C\\u0064",
    "character_count": 11,
    "unicode_points": [
      {
        "char": "H",
        "unicode": "\\u0048",
        "codepoint": "U+0048"
      },
      {
        "char": "e",
        "unicode": "\\u0065",
        "codepoint": "U+0065"
      },
      {
        "char": "l",
        "unicode": "\\u006C",
        "codepoint": "U+006C"
      },
      {
        "char": "l",
        "unicode": "\\u006C",
        "codepoint": "U+006C"
      },
      {
        "char": "o",
        "unicode": "\\u006F",
        "codepoint": "U+006F"
      },
      {
        "char": " ",
        "unicode": "\\u0020",
        "codepoint": "U+0020"
      },
      {
        "char": "W",
        "unicode": "\\u0057",
        "codepoint": "U+0057"
      },
      {
        "char": "o",
        "unicode": "\\u006F",
        "codepoint": "U+006F"
      },
      {
        "char": "r",
        "unicode": "\\u0072",
        "codepoint": "U+0072"
      },
      {
        "char": "l",
        "unicode": "\\u006C",
        "codepoint": "U+006C"
      },
      {
        "char": "d",
        "unicode": "\\u0064",
        "codepoint": "U+0064"
      }
    ]
  }
}

About the Unicode Escape/Unescape API

Unicode Escape/Unescape works by converting characters to their Unicode escape sequence representation (\uXXXX format) or decoding escape sequences back to original characters. Properly handles surrogate pairs for emojis and special characters.

What people use it for

JSON Processing
Escape Unicode characters in JSON strings for safe transmission and storage
Code Generation
Generate Unicode escape sequences for use in source code, configuration files, or string literals
Data Migration
Convert Unicode characters to escape sequences when migrating between systems with different encoding support
Debugging
View Unicode escape sequences of characters to debug encoding issues and identify problematic characters

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 Unicode Escape/Unescape

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

Questions.

Common questions about the Unicode Escape/Unescape API.

Read the docs →
How far does the Starter plan go for text conversions?
Starter covers 100,000 conversion requests each month for $29.99. Each API call costs 2 credits, which works out to about $0.30 per 1,000 calls or $0.0003 per call. If you are testing, the Free plan gives you 100 calls per month.
Does it support emojis and multi-byte characters?
Yes. It supports all Unicode characters, including emojis, symbols, and non-Latin alphabets. It properly generates and parses surrogate pairs so high-value code points are preserved accurately.
Can it decode escaped strings back into readable text?
Yes. The API works in both directions. You can escape raw text into Unicode escape sequences or unescape strings formatted with slash-u escape codes back into standard characters.
Are character-by-character codepoints included on the Free plan?
No. The detailed codepoints array is a premium feature reserved for paid plans. The Free plan returns the converted escaped or unescaped string along with character counts, while any paid plan unlocks individual character breakdowns, escape strings, and U-notation values.
Will emojis break when converting to four-digit escape sequences?
No. Characters outside the Basic Multilingual Plane are automatically converted into valid surrogate pairs using standard slash-u notation. This ensures your downstream JSON parsers and code generators can read the output without character corruption.

Ready to build with Unicode Escape/Unescape? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

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

Browse all APIs