URL Encoder & Decoder

Encode and decode URLs, query strings and Base64 — instantly in your browser

0 characters
0 characters

Mode Guide

  • URL Encode — spaces → %20, & → %26
  • URL Decode — %20 → space
  • Base64 Encode — text → base64 string
  • Base64 Decode — base64 → original text

Quick Tips

  • Use Swap to decode a result
  • Encode query param values, not the full URL
  • Double-encoded? Decode twice using Swap
  • Base64 is ~33% larger than original

Free URL Encoder & Decoder Online

Encode special characters in URLs to make them safe for transmission, or decode percent-encoded URLs back to readable text. Also supports Base64 encoding and decoding for text and API payloads. Everything runs in your browser — no data is ever sent to a server.

Features

URL Encode

Converts special characters to percent-encoded equivalents using encodeURIComponent for safe URL transmission.

URL Decode

Decodes percent-encoded URLs back to readable form. Handles double-encoded URLs with the Swap button.

Base64 Encode

Encodes any text to Base64 format for use in data URIs, JSON payloads, email attachments and API tokens.

Base64 Decode

Decodes Base64 strings back to plain text. Supports standard and URL-safe Base64 variants.

Swap Input/Output

One click to move the output into the input for chained operations — decode twice, or encode then inspect.

100% Private

All encoding runs in your browser via native JavaScript APIs. Nothing is sent to any server.

Who Uses This Tool?

DevelopersEncode query parameters, decode API responses and inspect percent-encoded values when debugging.
Web DesignersCreate data URIs by Base64-encoding SVGs and small images for inline HTML/CSS embedding.
Security TestersDecode obfuscated URLs in phishing emails and security payloads to analyse their true content.
Data EngineersEncode special characters in database connection strings, API keys and configuration values.

Common Questions

What is URL encoding?
URL encoding (percent-encoding) replaces special characters with a % followed by two hexadecimal digits. A space becomes %20, & becomes %26, and = becomes %3D. It ensures URLs are safely transmitted over the internet without ambiguity.
What is the difference between URL encode and Base64 encode?
URL encoding converts special characters to percent-hex sequences and is used for URLs and query strings. Base64 encodes binary data as ASCII characters and is used for embedding data in HTML/CSS, JSON payloads and email attachments. They serve different purposes and are not interchangeable.
Should I encode the whole URL or just the values?
Encode only the values (query parameter values, path segments) — not the whole URL. Encoding the full URL would also encode the /, :, ? and & characters that give the URL its structure, making it invalid.
Is this tool safe for sensitive data like API keys?
Yes — all encoding and decoding runs entirely in your browser using native JavaScript. No data is transmitted to any server. You can safely encode API keys, tokens and passwords.

Pro Tip

When building query strings manually, always encode each parameter value individually using URL Encode — not the whole URL. Then join them with & and append to the base URL with ?. This prevents accidentally encoding the structural characters (?, &, =) that hold the query string together.

Did You Know?

128
Characters in ASCII
URL encoding was designed to handle the fact that URLs can only contain a safe subset of ASCII characters. The original RFC 1738 (1994) defined which characters are safe and which must be encoded — a standard still in use today.
RFC 3986
The URL Standard
The current URL encoding standard is defined in RFC 3986 (2005). It defines unreserved characters (A-Z, a-z, 0-9, -, _, ., ~) that never need encoding, and reserved characters (/, ?, #, &, =, +) that may need encoding depending on context.
+33%
Base64 Size Overhead
Base64 encoding increases data size by approximately 33% because it represents every 3 bytes as 4 characters. A 100KB image embedded as Base64 in HTML becomes ~133KB. This is why Base64 is only recommended for small images and inline data.

Common Encoded Characters

CharacterURL EncodedCommon Use
Space%20Query parameter values
&%26Literal & in query values
=%3DLiteral = in query values
+%2BLiteral + (not space)
#%23Hash in query values
/%2FSlash in path segments
@%40Email in URLs
%%25Literal percent sign

You May Also Ask

Why does + sometimes mean a space?
In HTML form encoding (application/x-www-form-urlencoded), spaces are encoded as + rather than %20. This is a legacy convention from early web forms. In modern URL encoding (RFC 3986), + is a literal plus sign and spaces must be %20. Always be explicit about which convention you are using.
What is URL-safe Base64?
Standard Base64 uses + and / characters which have special meaning in URLs. URL-safe Base64 replaces + with - and / with _, making the output safe to use directly in URLs without further encoding. JWT tokens use URL-safe Base64.
Can I encode non-English characters?
Yes — non-ASCII characters (Chinese, Arabic, accented letters, emoji) are first converted to UTF-8 bytes, then each byte is percent-encoded. For example, the € sign encodes to %E2%82%AC (its 3-byte UTF-8 representation).

Common Mistakes

Encoding the entire URL
Applying URL encode to a full URL encodes the /, :, ? and & characters, destroying the URL structure and making it invalid.
Encode only the query parameter values, not the base URL.
Double-encoding by accident
Encoding an already-encoded URL turns %20 into %2520 (%25 is the encoding of %). The server decodes once and gets %20 instead of a space.
Check if the input is already encoded before encoding again. Use Decode first if unsure.
Confusing Base64 with encryption
Base64 is encoding, not encryption — it is trivially reversible by anyone. Never use it to hide sensitive information.
Use our Encrypt & Decrypt tool for actual encryption with a key.