/

URL Encoder / Decoder

Encode special characters for safe use in URLs, or decode percent-encoded strings. Handles full URLs, components, and query strings.

Jump to section
Complete your workflow โ†’
Advertisement
Ad ยท responsive

How to Use the URL Encoder / Decoder

Type or paste text into the left (decoded) panel to encode it, or paste percent-encoded text into the right (encoded) panel to decode it. Both panels stay in sync โ€” changes to either side instantly update the other. Choose the encoding context at the top: Component mode (default) encodes all reserved characters and is right for query parameter values; Full URL mode preserves URL structure while encoding unsafe characters; Query String mode lets you build and parse key-value parameter tables.

About This Tool

Encode and decode URLs using the same native browser functions that JavaScript and web browsers use internally. Three encoding contexts cover every use case: Component mode uses encodeURIComponent() to encode all reserved characters, making values safe for query parameters and path segments. Full URL mode uses encodeURI() to encode a complete URL while preserving its structure. Query String mode parses and builds key-value parameter strings using URLSearchParams. The difference matters โ€” using the wrong encoding function is a common source of bugs in web development. Related: format API responses for the decoded query output, Base64 Image Encoder for encoding binary data as text, and debug regex patterns for validating query-parameter values.

Quick Reference Table

CharacterEncodedDescription
(space)%20Space character
&%26Ampersand
=%3DEquals sign
?%3FQuestion mark
/%2FForward slash
:%3AColon
@%40At sign
+%2BPlus sign
#%23Hash / fragment
%%25Percent (literal)

Frequently Asked Questions

What is the difference between %20 and + for spaces?

Both represent a space in URL context, but in different places. %20 is the standard percent-encoded space valid anywhere in a URL. The + sign represents a space only in application/x-www-form-urlencoded data โ€” the format used by HTML form submissions. In a URL path, + is a literal plus sign, not a space. When in doubt, use %20.

Why does my URL have %25 in it?

A literal % character must itself be encoded as %25. If you see %25 in a URL, it means the original text contained a % character. Double-encoding (%2520) means a % that was already encoded (%25) got encoded again โ€” a common mistake when encoding an already-encoded string.

When should I use encodeURI vs encodeURIComponent?

Use encodeURI() when encoding a complete URL that you want to remain navigable โ€” it preserves /, ?, &, =, and other structural characters. Use encodeURIComponent() when encoding a value that will be placed inside a URL, such as a query parameter value or a path segment.

What characters are never encoded?

encodeURIComponent never encodes: letters (Aโ€“Z, aโ€“z), digits (0โ€“9), and these symbols: - _ . ! ~ * โ€™ ( ). These are considered unreserved characters and are always safe in any part of a URL.

Does this work with non-English characters?

Yes. All Unicode characters โ€” including accented letters, Chinese, Arabic, emoji, and any other script โ€” are correctly encoded using their UTF-8 byte sequences. For example, the Icelandic letter รฐ encodes to %C3%B0.

The Toobits Team

Created by The Toobits Team ยท Engineering & Editorial

Toobits is built, tested, and maintained by a small independent engineering team. Every tool is written in TypeScript, runs entirely in the browser, and is reviewed against its source formulas before publication.

Editorial policy ยท Updated April 2026

Advertisement
Ad ยท responsive