SaveOnlineVideosOnline Media Toolkit

Free URL Encoder & Decoder

Encode URL query parameters with percent-encoding and decode percent-encoded URLs back to readable text. Choose encodeURI or encodeURIComponent. All processing in your browser.

encodeURIComponent — encodes everything including &, =, ?, #, /. Use for individual query parameter values.

All processing happens in your browser — your data never leaves your device.

About Free URL Encoder & Decoder

URLs are governed by a strict specification (RFC 3986) that limits which characters are allowed in different parts of a URL. Only unreserved characters — letters A-Z and a-z, digits 0-9, and the characters -, _, ., ~ — can appear unencoded anywhere in a URL. Every other character must be represented as a percent-encoded sequence: a percent sign (%) followed by the two-digit hexadecimal ASCII code for that character. For example, a space becomes %20, the ampersand & becomes %26, an equals sign = becomes %3D, and a forward slash / becomes %2F.

Percent-encoding (also called URL encoding) is essential whenever you embed user-supplied text, file names, search queries, or other data in URLs. Without encoding, characters like & would be interpreted as query parameter separators, # would be interpreted as a fragment identifier, and spaces would make the URL malformed. Our free URL encoder lets you choose between two encoding functions: encodeURIComponent, which encodes everything including &, =, ?, #, and / — ideal for individual query parameter values; and encodeURI, which preserves URL structure characters (:, /, ?, #, &, =, @) and is intended for complete URLs that are mostly well-formed but contain some unsafe characters. The tool also decodes percent-encoded strings back to readable text. A swap button lets you instantly reverse encode to decode. All processing uses JavaScript's native encodeURIComponent and encodeURI functions — running entirely in your browser with no server involved.

Key Features

Everything you need — no software installation required.

🔢

Two Encoding Functions

Choose between encodeURIComponent (encodes everything including &, =, ?, #, /) for individual query parameter values, and encodeURI (preserves URL structure characters) for complete URLs. The type hint below the toolbar explains when to use each function, helping you choose correctly without having to look up the difference.

🔄

Encode and Decode

Switch between Encode and Decode modes with a click. Encode converts readable text to percent-encoded representation (%20, %26, %3D). Decode converts percent-encoded URLs back to their original readable form. Both operations use JavaScript's native built-in functions for accurate results.

↕️

One-Click Swap

After encoding, click Swap to instantly move the output to the input and switch to Decode mode. This makes it fast to verify that a decode operation reproduces the original text, or to reverse-engineer what a percent-encoded URL parameter contains without manual copy-paste.

📋

One-Click Copy

Copy the encoded or decoded output to your clipboard with a single click. Works in all modern browsers using the Clipboard API with a legacy fallback. The button shows 'Copied!' confirmation for 2 seconds so you know the operation succeeded.

⚠️

Error Handling

Decoding malformed percent-encoded strings (e.g., a lone % not followed by two hex digits, or %80-%FF sequences that are invalid UTF-8) throws a URI malformation error. The tool catches this and shows a clear error message, preventing silent incorrect output.

🔒

100% Private — Browser-Only

All encoding and decoding uses JavaScript's built-in encodeURIComponent, encodeURI, decodeURIComponent, and decodeURI functions, running locally in your browser. No text is transmitted to any server, making the tool safe for encoding API keys, tokens, passwords in query parameters, and other sensitive URL data.

How to Use Free URL Encoder & Decoder

Get your result in seconds — completely free, no registration needed.

1

Choose Encode or Decode mode

Click Encode to convert readable text to percent-encoded form, or Decode to convert a percent-encoded string back to readable text.

2

Select the encoding function

Choose encodeURIComponent for query parameter values (encodes everything including &, =, ?, #) or encodeURI for a complete URL (preserves URL structure characters). The hint text below the toolbar explains the difference.

3

Enter your text and process

Paste or type your input in the left text area. Click Encode or Decode. The result appears instantly in the right text area. If the input contains malformed percent sequences, an error message is displayed.

4

Copy or swap the result

Click Copy to copy the output to your clipboard. Click Swap to move the output to the input and switch modes for quick round-trip verification.

URL Encoding Functions Compared

Wide format support ensures compatibility with virtually any file you upload.

FormatDescriptionBest ForQuality
encodeURIComponentEncodes all characters except: A-Z, a-z, 0-9, -, _, ., !, ~, *, ', (, ). Encodes: space (%20), & (%26), = (%3D), ? (%3F), # (%23), / (%2F), + (%2B), @ (%40).Query parameter values, form data, path segments containing special charsMost aggressive — use for values
encodeURIEncodes all characters except unreserved chars plus: ; , / ? : @ & = + $ #. Preserves URL structure. Does NOT encode: : / ? # & = + @ , ; $.Complete URLs that are mostly well-formedPreserves structure — use for full URLs
decodeURIComponentReverses encodeURIComponent — decodes all percent-encoded sequences including %2F (/) and %23 (#). Throws if input contains malformed percent sequences.Decoding query parameter values received from server or URLDecodes everything
decodeURIReverses encodeURI — does NOT decode sequences that encodeURI would not have encoded (e.g., %2F, %23, %26). Preserves URL structure characters in their encoded form.Decoding complete URLs while preserving structurePreserves structure characters

Who Uses Free URL Encoder & Decoder?

Trusted by millions of users across different industries and workflows.

🔌

API Developers

Build API request URLs with query parameters that contain special characters. Encode each parameter value with encodeURIComponent before appending it to the URL. This ensures characters like &, =, +, and # in your data are not interpreted as URL delimiters by the server.

🌐

Web Developers

Generate safe URLs for user-generated content: search queries, file names in paths, user profile slugs. URL-encode any value that came from user input before including it in a URL to prevent URL injection and malformed links.

🧪

API Testing (Postman / Insomnia)

Postman and similar tools sometimes require manually URL-encoded query parameters. Encode the values here and paste them directly into the query string. Also useful for decoding encoded URLs from server logs or error messages to understand what was actually requested.

🔍

SEO & Link Analysis

Decode percent-encoded URLs from server logs, Google Search Console, or analytics tools to read them in human-readable form. Understand what search queries, referral parameters, and tracking codes are contained in encoded URL strings from web analytics data.

📊

Data Analysts

Extract and decode URL parameters from web log data, clickstream data, or referral tracking URLs. Percent-encoded query strings from logs are often unreadable — decode them to extract the original values: search terms, campaign IDs, product names, and user actions.

⚙️

Backend Developers

Verify that URL encoding in backend code produces the expected output. Test the difference between encodeURI and encodeURIComponent on various inputs. Debug URL parsing issues by encoding and decoding the problematic string to see exactly which characters are being transformed.

Why Choose Our Tool?

Built for speed, privacy, and reliability — everything works right in your browser.

Correct encoding function selection

The tool exposes both encodeURI and encodeURIComponent with a clear explanation of when to use each, preventing the common mistake of using the wrong function and producing malformed or over-encoded URLs.

No account or registration

Open the tool, paste text, encode or decode, copy. No sign-up form, no email confirmation, no premium tier. Completely free and anonymous.

Native browser functions

Uses JavaScript's built-in encodeURIComponent/decodeURIComponent which produce the same output as any browser or server-side JavaScript environment. Results are guaranteed to match what your JavaScript code would produce.

Works offline after page load

encodeURIComponent and decodeURIComponent are browser built-ins — they require no network access. The tool works without an internet connection once the page has loaded.

Pro Tips & Best Practices

Get the best results with these expert recommendations.

💡

Always use encodeURIComponent for query parameter values

The most common URL encoding mistake is using encodeURI for query parameter values. encodeURI does not encode & and = characters, which are used as parameter delimiters in query strings. If a parameter value contains & (e.g., 'cats & dogs'), encodeURI would leave it unencoded, causing the server to interpret it as two separate parameters. Always use encodeURIComponent for values.

💡

Decode percent-encoded URLs from logs for readability

Server access logs store raw URLs as received from browsers, with spaces encoded as %20 and other characters percent-encoded. Paste a log URL into the tool to decode it to a readable form for debugging, analysis, or copying into a browser address bar.

💡

Encode file names in download URLs

File names with spaces and special characters (report (Q4 2025).pdf, données-export.csv) must be percent-encoded in download URLs. Encode the file name portion of the path with encodeURIComponent to ensure the URL is valid across all browsers and server configurations.

💡

Double-encoding is a common bug

If you encode a URL parameter value that is already percent-encoded, the % signs themselves will be encoded to %25, producing double-encoded output (%2520 instead of %20). Always encode only unencoded values. If your input already contains %20 and similar sequences, use Decode first to get the raw text, then re-encode if needed.

Related Tools

More free online tools you might find useful.

Frequently Asked Questions

Everything you need to know about Free URL Encoder & Decoder.

What is URL encoding (percent-encoding)?
URL encoding converts characters that are unsafe or reserved in URLs into a percent-encoded representation: a percent sign followed by the two-digit hexadecimal ASCII code for that character. For example, space → %20, & → %26, = → %3D, / → %2F. RFC 3986 defines which characters must be encoded in different URL components. Only unreserved characters (letters, digits, -, _, ., ~) can appear unencoded everywhere in a URL.
When should I use encodeURI vs encodeURIComponent?
Use encodeURIComponent for individual values within a URL — query parameter values, path segments that might contain special characters, form field values. It encodes everything including & and = which are URL structure characters. Use encodeURI for a complete URL that is mostly well-formed — it preserves URL structure characters (:, /, ?, #, &, =, @) so the URL structure remains intact.
Why does a URL look different after encoding?
Percent-encoding replaces each unsafe character with its %XX representation. The encoded URL is functionally identical to the original — browsers decode the URL before sending the HTTP request. The encoded form is what appears in server logs, referrer headers, and analytics tools.
What characters need to be percent-encoded?
Characters outside the unreserved set (A-Z, a-z, 0-9, -, _, ., ~) must be percent-encoded in URL path segments and query parameter values. Additionally, characters that have reserved meaning in URLs (/ ? # & = + : @ , ;) must be encoded in contexts where they would otherwise be interpreted as URL structure rather than data.
Why does my URL contain %20 instead of + for spaces?
Both %20 and + represent a space in URLs, but in different contexts. %20 is the general percent-encoding of a space (correct for path segments and most query values). The + character represents a space only in application/x-www-form-urlencoded encoding — the format used by HTML form submissions. JavaScript's encodeURIComponent uses %20, which is safer and more universally correct.
Why does decoding fail with a URI malformation error?
decodeURIComponent throws a URIError when the input contains a % that is not followed by exactly two hexadecimal digits, or when a percent-encoded sequence does not form a valid UTF-8 byte sequence. Common causes include: a literal % that was not encoded (should be %25), multi-byte UTF-8 sequences that are partially encoded, or copy-paste errors that dropped characters.
Is my URL data sent to a server when I use this tool?
No. All encoding and decoding uses JavaScript's built-in encodeURIComponent, encodeURI, decodeURIComponent, and decodeURI functions, running in your browser's JavaScript engine. No data is transmitted to any server. This makes the tool safe to use with URLs that contain API keys, session tokens, passwords, or other sensitive query parameter values.
What is the difference between URI and URL?
A URI (Uniform Resource Identifier) is a generic string that identifies a resource. A URL (Uniform Resource Locator) is a type of URI that also specifies how to access the resource (via a protocol like https://). In practice, the terms are used interchangeably in web development. Both encodeURI and encodeURIComponent work on the same percent-encoding scheme defined in RFC 3986.