Unicode Encoder
Convert text to Unicode code points in \u escapes, U+ notation, HTML decimal, HTML hex, and decimal formats. Handles emoji and astral characters correctly.
About Unicode Encoder
Overview
The Unicode Encoder converts text into Unicode code points in five common formats: JavaScript-style backslash-u escapes, U+ notation, HTML decimal entities, HTML hex entities, and plain decimal code points. It is useful when you need to embed special characters in source code, configuration files, or web pages. Emoji and astral characters are handled correctly, with surrogate pairs emitted for backslash-u output.
Features
- Five output formats: \u escapes, U+ notation, HTML decimal, HTML hex, and decimal code points.
- Correct handling of emoji and astral characters using surrogate pairs and full code points.
- Supports files up to 100MB via upload or drag and drop.
- Live mode for real-time conversion while you type.
- One-click copy to clipboard.
- Download the result as a text file.
- All processing happens in your browser, keeping your data private.
- Includes dark mode for comfortable use.
- Responsive layout that works on mobile devices.
How to Use
- Paste text into the input box, or upload a text file up to 100MB.
- Choose the output format you want from the dropdown.
- Turn on live mode for instant conversion as you type, or turn it off and click Encode.
- Use the Copy button to copy the result, or Download to save it as a file.
FAQ
What is a Unicode code point?
A code point is a number that identifies a single character in the Unicode standard. For example, the letter A is U+0041 and the smiley emoji is U+1F600. Code points are written in hex and can be encoded using one of several notations.
How are emoji and other astral characters handled?
Characters above U+FFFF are called astral characters. The backslash-u format represents them as a pair of surrogate codes, while U+, HTML, and decimal formats use the full code point. The encoder picks the right representation for the format you choose.
Is my text sent to a server?
No. All encoding happens in your browser, so your text never leaves your device. You can use this tool on sensitive content with confidence.