Handy Dev Tools
Simple online tools for everyday tasks.

No favorites

    Base64 Encoder/Decoder
    Markdown to HTML
    HTML to Markdown
    URL Encoder/Decoder
    Unicode Escape Converter
    Unicode Encode/Decode
    SQL Formatter
    SQL Splitter
    JSON Formatter
    XML Formatter
    YAML Formatter
    GraphQL Formatter
    JSON to YAML Conversion
    YAML to JSON Conversion
    JSON to TOML Conversion
    TOML to JSON Conversion
    HTML Entity Encode/Decode
    TOML to YAML Conversion
    YAML to TOML Conversion
    CSV to SQL INSERT Conversion
    Markdown Table Generator
    JSON to XML Conversion
    XML to JSON Conversion
    UUID Generator
    ULID Generator
    Password Generator
    Hash Generator
    Lorem Ipsum Generator
    Lorem Picsum Image URL Generator
    Test Data Generator Tool
    QR Code Generator
    S3 Path Parser & Converter
    IP Address Calculator
    Subnet Split
    Subnet Consolidation
    CloudFront Signed URL Generator
    RDS Connection String Generator
    Coordinate Format Converter
    Geo Format Converter
    JWT Decoder & Parser
    Basic Auth
    Password Strength Analyzer
    Credit Card Validator
    RSA Key Pair Generator
    Case Conversion
    Romaji Conversion
    Roman Numeral Conversion
    Phonetic Code Conversion
    Character Counter
    Text Diff
    HTML Tag Remover
    Regex Tester
    Color Conversion
    Dice Roll
    Crontab generator
    Crontab parser
    Emoji Picker
    Unix Timestamp Converter
    HTTP Status Code Search
    Port Number Search
    MIME Type Lookup
    Base64 File Converter
    Image Base64 Encode/Decode
    User-Agent Parser
    URL Parser
    OGP Checker
    Commit Message Generator
    Chmod Calculator
    Terminal GIF Generator
    .env Parser & Validator
Ctrl+K

Unicode Escape Converter

Convert text to Unicode escapes (\uXXXX, \u{…}, %u, U+, &#x, 0x) or decode them back. JavaScript, JSON, Python-friendly. In-browser, no registration.

Text to escape
Result
Read Only

Format and usage

Escape: pick output format (\uXXXX, ES6 \u{code point}, legacy %uXXXX, U+, HTML &#x…;, 0x…). Unescape: pick a format or use Auto-detect for mixed input. In Unescape mode, Insert adds \u, \u{, or %u depending on the format. Max 10,000 characters.

How to use

About this tool

Convert text to Unicode escapes or decode them back in real time. Supports \uXXXX, ES6 \u{…}, legacy %uXXXX, U+, HTML &#x…;, and 0x…. JavaScript, JSON, Python-friendly; all in your browser.

How to use

In Escape mode, pick the output format. In Unescape, turn on Auto-detect for mixed input or pick a single format. Type or paste; results update instantly. In Unescape, Insert adds \u, \u{, or %u depending on the format.

Options

Escape: choose output among \uXXXX, \u{…}, %uXXXX, U+, &#x, 0x. Unescape: pick a format or Auto-detect (mixed input). For code-point–first workflows see the Unicode Encode/Decode tool. Max 10,000 characters.

Use cases

• Inspecting and converting escaped strings in JavaScript/JSON • Decoding \uXXXX in logs and error messages • Exchanging multilingual text in escape form • Preparing Unicode for regex or code

Code Examples

JavaScript
Read Only
1// \uXXXX (manual)
2"Hello".split('').map(c => '\\u' + c.charCodeAt(0).toString(16).padStart(4,'0')).join('');
3
4// ES6 \u{…} for astral code points
5"\\u{1f600}"  // 😀 in a string literal
6
7// Unescape from JSON
8JSON.parse("\u0048\u0065\u006c\u006c\u006f");  // "Hello"
Python
Read Only
1# Decode \uXXXX in a byte string with backslashes
2s = "\\u0048\\u0065\\u006c\\u006c\\u006f"
3s.encode().decode("unicode_escape")  # "Hello"
4
5import codecs
6codecs.decode("\\u3042", "unicode_escape")  # "あ"
PHP / Laravel
Read Only
1// Pass valid JSON (string in double quotes)
2json_decode('"\u0048\u0065\u006c\u006c\u006f"');  // "Hello"
3
4// Laravel: same as PHP; use json_decode on JSON text from config/API

How it works

\uXXXX: BMP uses four hex digits; astral uses a UTF-16 surrogate pair. \u{…}: ES6 code point escapes. %uXXXX: UTF-16 code units (legacy-style). U+, &#x, 0x follow the same rules as our Unicode Encode/Decode tool. Auto-detect scans left-to-right with longest-match tokens; other characters pass through.

Privacy and data

Conversion is done in the browser; input and results are never sent to a server.

FAQ

Q: What is a Unicode escape sequence?
A: A way to write a character by its code point. \uXXXX uses four hex digits (JavaScript/JSON). \u{…} (ES6) can use one to six hex digits for any code point, including emoji in a single escape.
Q: What is the difference between Escape and Unescape mode?
A: Escape turns plain text into the selected escape format. Unescape turns escaped text back; you can pick a format or use Auto-detect for mixed \u, \u{…}, %u, U+, &#x, and 0x tokens.
Q: How do I decode unicode escape sequences in Python?
A: If your string contains backslashes like \u0048, use s.encode().decode("unicode_escape") on the str, or codecs.decode(s, "unicode_escape"). For actual JSON text, use json.loads() which decodes \uXXXX automatically.
Q: Why does my JSON contain \uXXXX characters?
A: JSON allows non-ASCII characters to be written as \uXXXX for ASCII-safe files, compact logs, or generator settings. json.dumps(..., ensure_ascii=True) emits them; parsers decode them back to Unicode.
Q: What's the difference between \uXXXX and \u{XXXXX}?
A: \uXXXX is the classic form: exactly four hex digits, one UTF-16 code unit (BMP) or two escapes for a surrogate pair. \u{…} is ES6: one escape for the full code point, e.g. \u{1F600} for 😀.
Q: How to unescape unicode in PHP/Laravel?
A: Wrap the value in a JSON string and call json_decode('"\u0041"') → "A". For API responses, decode the JSON body first; Laravel's json() helper returns already-decoded strings.
Q: Does this tool support emoji or characters outside the BMP?
A: Yes. In \uXXXX mode, astral characters use a surrogate pair. In \u{…} mode, one braced escape holds the full code point. %uXXXX follows legacy UTF-16 units.
Q: Is this the same as the Unicode Encode/Decode tool?
A: This tool focuses on backslash-style and %u escapes plus U+/HTML/0x. The Unicode Encode/Decode tool is optimized for code-point notation (U+, entities, 0x) with the same decode engine for those formats.
Q: Is there a character limit?
A: Yes — 10,000 characters per input.