How to Use Base64 Encoding in Real Projects
Learn practical, production-ready ways to use Base64 encoding: data URLs for images, JWT payloads, API tokens, and email attachments, with real code examples.
Aug 08, 2026
Convert text to Unicode code points (U+XXXX) and back. Supports BMP and supplementary characters (emojis, rare scripts).
Unicode is a universal character encoding standard that assigns a unique number (called a code point) to every character across all writing systems. Code points are typically written in the format U+XXXX, where XXXX is a hexadecimal number. The range U+0000 to U+FFFF is the Basic Multilingual Plane (BMP), which covers most common characters. Supplementary characters (like emojis) use code points from U+10000 to U+10FFFF.
For example, the Latin letter A has code point U+0041, the Euro sign € is U+20AC, and the globe emoji 🌍 is U+1F30D.
The encoder converts each character to its full Unicode code point (up to 6 hex digits). The decoder accepts formats like U+0041, 0041, \\u0041, and 0x0041.
Unicode assigns a unique code point to each character. UTF-8 is a encoding scheme that converts those code points into a sequence of bytes for storage and transmission. For example, the character € (U+20AC) is encoded as the three bytes E2 82 AC in UTF-8.
Surrogate pairs are a mechanism in UTF-16 to represent supplementary characters (code points above U+FFFF). Two 16-bit code units (U+D800-U+DFFF) are combined to represent one character. JavaScript internally uses UTF-16, so characters like emojis appear as two surrogate pairs. This tool handles surrogates and converts them to the proper code point.
The decoder accepts multiple formats: U+0041, u+0041, \\u0041, 0x0041, 0X0041, or plain 0041. Hex digits can be uppercase or lowercase, and values can be separated by spaces, commas, or other whitespace.
In JavaScript, strings are UTF-16 encoded. Emojis like 🌍 (U+1F30D) have code points above U+FFFF, so JavaScript represents them as two surrogate code units: 0xD83C 0xDF0D. This encoder detects surrogates and combines them into the correct code point (U+1F30D).
The Unicode standard defines code points from U+0000 to U+10FFFF (1,114,112 possible values). This tool supports the full range, though code points above U+FFFF require surrogate pair handling in JavaScript.
JavaScript
const text = "€100";
const codePoints = [...text].map(c =>
'U+' + c.codePointAt(0).toString(16).toUpperCase().padStart(4, '0')
);
// ["U+0000", "U+20AC", "U+0031", "U+0030", "U+0030"]
Python
def to_unicode(text):
return ' '.join(
f'U+{ord(c):04X}' for c in text
)
to_unicode("€100")
Encode and decode Base64 strings
Encode and decode URL strings
Encode/decode HTML entities
Convert domain names to/from Punycode
Encode/decode text in various formats
Blog
Learn practical, production-ready ways to use Base64 encoding: data URLs for images, JWT payloads, API tokens, and email attachments, with real code examples.
Aug 08, 2026
Learn what an SMS counter is, how GSM 7-bit and UCS-2 encoding work, and why character count matters for SMS delivery and billing.
Jun 17, 2026
Learn the fundamentals of binary encoding, how computers represent data as 0s and 1s, and how to convert between binary and other formats.
Jun 16, 2026