Free URL Encoder Online

Encode or decode URL text in your browser with encodeURIComponent. Nothing uploaded. Fix query strings, API params and + vs %20. Free, no signup.

No login. Files processed for your request and discarded. Free to use. Files processed & discarded →

Compress PDF — it's free or choose from 130+ tools

130+ Free Tools
— Files Processed
— Happy Visitors
— Pages Explored
0 Files Stored

Part of Text tools: See all Text tools.

What is URL Encoder?

Encode special characters in strings to their percent-encoded URL-safe equivalents, or decode percent-encoded URLs back to readable text. Handles spaces, ampersands, Unicode characters, and all reserved URL characters.

How to use URL Encoder

  1. Paste your string or URL into the input field.
  2. Select 'Encode' to convert special characters to percent-encoded format, or 'Decode' to reverse the process.
  3. Click the action button to perform the conversion.
  4. Copy the result from the output field.

Why use this tool?

Improperly encoded URLs cause broken links, failed API requests, and data corruption in query parameters. This URL encoder/decoder ensures your URLs and query strings are correctly formatted for web browsers, APIs, and HTTP requests.

FAQ

What characters get encoded?
All characters outside the unreserved set (A-Z, a-z, 0-9, hyphen, underscore, period, tilde) are converted to their percent-encoded form, such as %20 for spaces.
Does it encode the entire URL or just the query string?
You can encode any string. For full URLs, it is best to encode only the parameter values rather than the entire URL to avoid breaking the protocol and path structure.
Does it handle Unicode characters like emojis or accented letters?
Yes, Unicode characters are encoded using UTF-8 byte sequences (e.g., %C3%A9 for 'é').
What is the difference between encodeURI and encodeURIComponent behavior?
This tool uses full component encoding (equivalent to encodeURIComponent), which encodes all special characters including /, ?, and &.
Is this tool free?
Yes, the URL encoder/decoder is free to use with no limits.

URL Encoder — In-Depth Guide

URL encoding converts special characters into percent-encoded sequences safe for use in web addresses. Spaces become %20, ampersands become %26, and other reserved characters are escaped to prevent them from being misinterpreted as URL delimiters. This is essential when constructing query strings with user-provided data.

Web developers encode URL parameters to prevent injection attacks and ensure links work correctly. A search query containing special characters like question marks or hash symbols would break the URL structure without proper encoding. Form data submitted via GET requests must be URL-encoded to reach the server intact.

API developers encode request parameters when constructing URLs programmatically. OAuth signatures, webhook URLs, and callback parameters frequently require double-encoding to survive multiple levels of URL parsing. Understanding URL encoding prevents subtle bugs where parameters are silently truncated or misinterpreted by intermediary servers.

When debugging web applications, decoding URL-encoded strings reveals the original text hidden behind percent sequences. This is useful when examining browser network requests, server logs, and error messages that display encoded URLs. A quick decode confirms whether the correct parameters were sent in API calls and form submissions.

Why percent-encoding exists

A URL is not free-form prose. It is a structured address with a small alphabet of characters that may appear literally. Several characters already mean something to the parser: ? starts the query string, & separates parameters, = joins a name to a value, / divides path segments, and # marks a fragment. Spaces, non-ASCII letters, and those reserved characters cannot ride inside a value as plain text, or the parser will treat your data as structure. Percent-encoding fixes that. Each unsafe byte is written as a % followed by two hexadecimal digits, so a space becomes %20, an ampersand inside data becomes %26, and a slash that belongs to a filename becomes %2F. Encoding is what lets arbitrary text travel safely inside a rigidly structured URL.

This page is a small browser tool for that job. Paste text, click Encode or Decode, and read the result in the output box. The Encode button runs JavaScript encodeURIComponent on the input. The Decode button runs decodeURIComponent after first turning any + into a space (a common form-encoding convention). Nothing is uploaded. There is no /api/url-encoder endpoint; a request to that path returns 404. Your text never leaves the tab.

Encode versus decode

Encoding is what you do when you are building a URL or a query parameter from raw data. You take readable text — a search term, a file name, a filter value — and make it URL-safe so it will not break the surrounding structure. Decoding is the mirror: you take a percent-encoded string from a log, a redirect, or a pasted link and restore the readable original so you can see what was actually sent. Most day-to-day work needs both directions. Build with encode; debug with decode.

A classic failure mode is skipping encode on a value that later contains an ampersand or a space. A search for “rock & roll” without encoding splits the query string; the server sees a truncated term and a phantom second parameter. The same class of bug appears with plus signs in phone numbers, slashes in path-like ids, and non-English characters in names. Encoding each value once before you join the URL is not optional polish — it is the difference between a link that works for every input and one that works only until the data gets interesting.

encodeURIComponent versus encodeURI

JavaScript exposes two similar helpers, and picking the wrong one is a frequent source of subtle bugs. encodeURI is meant for a complete URL that already has its structural characters in place. It leaves ?, &, =, /, # and a few others alone so the address still parses. encodeURIComponent is meant for a single value you are about to drop into a query string or path segment. It encodes those reserved characters too, which is what you want for data.

This tool uses encodeURIComponent (and matching decode) on purpose. If you paste a full URL and click Encode, the ? and & will become %3F and %26. That is correct when the whole string is a parameter value; it is the wrong shape if you only meant to escape one field inside an already-built address. For query construction, encode each parameter value separately, then join with literal & and =. Do not encode the entire finished URL unless that entire URL is itself a value inside another URL (a common pattern in redirect parameters).

Plus signs, spaces, and %20

Spaces are the character people trip over most often. In modern URL encoding, a space is %20. In the older application/x-www-form-urlencoded style used by many HTML forms, a space is often written as + instead. Both appear in the wild. This tool’s Encode path follows encodeURIComponent, which emits %20 for spaces, not +. On Decode, the tool first replaces + with a space and then runs decodeURIComponent, so form-style strings that used + still round-trip to readable text.

That decode convenience matters when you paste a query string copied from a browser address bar or a form POST dump. It also means a literal plus that was meant to stay a plus must already be percent-encoded as %2B in the input — otherwise the decoder will treat bare + as a space. When you are unsure, encode the raw value with this tool and compare the output to what your framework produced.

Common mistakes

Double-encoding happens when a value that is already percent-encoded is passed through encode again. A legitimate %20 becomes %2520 (the % itself was encoded). The request then looks “almost right” in logs and fails in confusing ways. If a decoded string still looks full of percent signs, decode again until it stabilises; the number of passes tells you how many layers helped.

Encoding the whole URL when you only needed to encode one parameter breaks the structure, as noted above. Leaving reserved characters bare inside values is the opposite mistake. Mixing encodeURI and encodeURIComponent across services can leave some characters escaped in one hop and not the next. Assuming + always means space outside form encoding will corrupt tokens and base64-like strings that legally contain plus. And if decode throws, this UI shows Invalid encoded string — usually a lone % that is not followed by two hex digits, or a truncated escape at the end of the input.

Query strings, APIs, and redirects

Most practical uses sit in three places. First, building query strings for links and fetch calls: encode each value, keep the separators literal. Second, reading logs and failed API requests: paste the odd-looking parameter, decode it, and inspect the real payload. Third, nested URLs — redirect targets, return-to links, OAuth callback parameters — where an entire URL is itself a value and must be component-encoded so its ? and & do not terminate the outer query early.

When you are wiring a client, prefer the language’s standard library helper that matches component encoding (in the browser, that is encodeURIComponent). Frameworks that claim to “auto-encode” still deserve a spot-check with this page: paste a value that contains &, space, non-ASCII text, and a plus, and confirm the wire format matches what you expect. For path segments that may contain slashes you want preserved as data, component encoding is again the right choice; path-style encoders that leave / alone are a different tool for a different job.

Privacy: everything stays in the browser

URL parameters often carry tokens, email addresses, search terms, or internal ids. Sending those to a remote “encoder API” creates an unnecessary copy of sensitive text. This tool does not do that. Encode and Decode run with the page’s own JavaScript. There is no upload field, no server conversion step, and no account. Close the tab and the input is gone with it. Use that property when you are decoding a production URL that happens to include a session-related value: the decode happens locally.

The page is free and needs no signup. Fair-use rate limits on the wider site do not apply to this client-side action because no encoding request hits the API. Claims on this page match the buttons you see: Encode → encodeURIComponent; Decode → replace + with space, then decodeURIComponent; on failure, the message Invalid encoded string.

Related developer tools on this site

Percent-encoding often sits next to other text transforms in a debugging workflow. Use Base64 Encode / Decode when a value is opaque binary or token material rather than URL text. Use the Hash Generator when you need a checksum or fingerprint of a string (that is one-way; it will not reverse like decode). Use the JSON Formatter when the decoded parameter turns out to be a JSON blob you need to read. Those three pages are on the same indexed keep-list cluster as this one and stay in the browser for the text you paste.

Build URLs by encoding each value once. Debug them by decoding until the text stops changing. When a request fails only for “weird” inputs, paste the failing parameter here before you dig into server logs — a missing encode, a double encode, or a plus-versus-%20 mismatch is often visible in seconds.

Also try

Related tools that work well with this one: