DevBento logoDevBento
Tools/URL Encoder & HTML Entity Encoder/Encode Special Characters for URLs

Encode Special Characters for URLs

Encode special characters and Unicode for URLs instantly. Convert spaces, ampersands, and emoji to percent encoding with UTF-8 support.

Send to:
Related Tools
%20URL Encoder & HTML Entity Encoder
Encode and decode URLs with encodeURIComponent or encodeURI, and escape HTML special characters to named or numeric entities. Runs locally in your browser.
b64Base64 Encoder / Decoder
Convert audio, PDF, images, and text to Base64 online. Encode files to Base64 strings for APIs, data URIs, and HTML embedding. No upload, runs in browser.

Encode Special Characters for URLs

Paste text with accents, symbols, or emoji and get valid percent encoding. The sample above covers every tricky class at once: accented Latin (é), reserved characters (&), punctuation (em dash), the percent sign itself, a dingbat check, and a four byte emoji.

What Each Character Becomes

Character UTF-8 Bytes Encoded
é C3 A9 %C3%A9
space 20 %20
& 26 %26
em dash E2 80 94 %E2%80%94
% 25 %25
✔ U+2714 E2 9C 94 %E2%9C%94
party emoji U+1F389 F0 9F 8E 89 %F0%9F%8E%89

The Two Functions

JavaScript ships two encoders and they are not interchangeable:

encodeURI('https://example.com/a b?x=1&y=2')
// https://example.com/a%20b?x=1&y=2  (& kept)

encodeURIComponent('a b&c=d')
// a%20b%26c%3Dd  (& encoded)

Rule: encodeURIComponent for values going inside a query string, encodeURI for a complete URL you want to keep structurally intact.

Debugging Checklist

Garbled text on the server usually means one of three things: the bytes were not UTF-8 (legacy Latin-1 form), the string was encoded twice (%2520 in logs is the tell), or a proxy decoded once and your app decoded again. Check the raw bytes first, then count the decode passes.

For query strings specifically see URL Encode Query Parameters, or encode binary data with the Base64 Encoder.

🔒

Nothing you paste leaves this tab. Every tool runs entirely in your browser — no upload, no server, no account.

© 2026 devbento.dev · built local-firstAll ToolsChangelog