URL Encoder / Decoder
Percent-encode URLs and query strings, or decode them back to readable text.
Percent-encode and decode URLs safely
URLs have strict syntax rules, and a handful of characters — spaces, &, ?, #, =, non-ASCII — have special meaning. To include them safely in a URL, they must be percent-encoded. This tool encodes and decodes URLs using the same semantics as JavaScript’s encodeURIComponent / encodeURI / decodeURIComponent / decodeURI.
Which mode should you use?
Component mode (safe for single parameter values):
- Input:
hello world & friends - Output:
hello%20world%20%26%20friends
Full-URI mode (safe for complete URLs):
- Input:
https://example.com/path with spaces?x=1&y=2 - Output:
https://example.com/path%20with%20spaces?x=1&y=2
Notice that ?, &, =, / and : are left alone in full-URI mode because they are structural.
Common mistakes
- Double-encoding. Running
encodeon an already-encoded URL turns%20into%2520. If your decoder output still looks encoded, decode it a second time — and then ask where the double-encoding originated. - Encoding the whole URL with component mode. This breaks the URL by encoding the protocol colon and slashes. Use full-URI mode for complete URLs and component mode only for individual query-parameter values.
- Not encoding
+in form data. If you are targeting a form-encoded endpoint, encode+as%2B.
Frequently asked questions
- What is the difference between component and full-URI encoding?
- Component encoding (
encodeURIComponent) is strict — it escapes every character that has special meaning in a URL, so it is safe for individual query-parameter values. Full-URI encoding (encodeURI) leaves reserved characters like/,?,#,&alone because they are expected in a complete URL. - Why does decoding sometimes fail?
- URLs that were not produced by a percent-encoder can contain bare
%signs that are not the start of a valid escape. The decoder throws an error when it hits such a sequence rather than silently returning wrong data. - Should I encode the "+" sign?
- The
+sign is reserved in the application/x-www-form-urlencoded format, where it means "space". In component mode,+is encoded to%2Bto avoid ambiguity.
Related tools
Base64 Encoder / Decoder
Encode text or files to Base64, or decode a Base64 string back to plain text.
Data URI Generator
Convert images, SVG and small files to data URIs for inline embedding in HTML, CSS or JSON. Smaller URL-encoding option for SVG.
HTML Entity Encoder / Decoder
Encode special characters as HTML entities or decode entities back to text. Includes a searchable reference of 150+ entities.
Image to PDF Converter
Combine JPG, PNG or WebP images into a single PDF — no upload, no watermark.
JSON to CSV Converter
Convert JSON arrays into CSV and vice versa — with header detection.
JSON to YAML Converter
Convert JSON to YAML or YAML to JSON with full fidelity.