stakritools
Developer
  • Base64 Encoder/Decoder
  • Color Picker & Converter
  • CSS Minifier
  • CSV to JSON Converter
  • Hash Generator
  • HTML Minifier
  • JS Minifier
  • JSON Formatter & Validator
  • JSON to CSV Converter
  • JWT Decoder
  • Markdown Editor
  • Password Generator
  • Regex Tester
  • SQL Formatter
  • Unix Timestamp Converter
  • URL Encoder/Decoder
  • UUID Generator
  • XML Formatter
  • YAML Formatter
View all
Image
  • Favicon Generator
  • Image Compressor
  • Image Cropper
  • Image Flipper
  • Image Resizer
  • Image Rotator
  • Image to Base64
  • JPG to PNG Converter
  • PNG to JPG Converter
  • QR Code Generator
  • SVG to PNG Converter
  • Watermark Image
  • WebP Converter
View all
SEO
  • FAQ Schema Generator
  • Meta Description Generator
  • Open Graph Generator
  • Robots.txt Generator
  • SEO Site Auditor
  • SERP Preview
  • Slug Generator
  • Twitter Card Generator
View all
Text
  • Case Converter
  • Find and Replace
  • Lorem Ipsum Generator
  • Random Text Generator
  • Remove Duplicate Lines
  • Remove Extra Spaces
  • Text Diff Checker
  • Word Counter
View all
Calculator
  • Age Calculator
  • BMI Calculator
  • Compound Interest Calculator
  • Date Difference Calculator
  • Discount Calculator
  • EMI Calculator
  • GST Calculator
  • Income Tax Calculator
  • Loan Calculator
  • Percentage Calculator
  • SIP Calculator
  • Tip Calculator
  • Unit Converter
View all
Blog
stakritools

205+ free, browser-based tools for developers, marketers, and creators — no sign-up, no clutter.

Developer Tools

  • Base64 Encoder/Decoder
  • Color Picker & Converter
  • CSS Minifier
  • CSV to JSON Converter
  • Hash Generator
  • HTML Minifier
  • JS Minifier
  • JSON Formatter & Validator
  • JSON to CSV Converter
  • JWT Decoder
  • Markdown Editor
  • Password Generator
  • Regex Tester
  • SQL Formatter
  • Unix Timestamp Converter
  • URL Encoder/Decoder
  • UUID Generator
  • XML Formatter
  • YAML Formatter

Image Tools

  • Favicon Generator
  • Image Compressor
  • Image Cropper
  • Image Flipper
  • Image Resizer
  • Image Rotator
  • Image to Base64
  • JPG to PNG Converter
  • PNG to JPG Converter
  • QR Code Generator
  • SVG to PNG Converter
  • Watermark Image
  • WebP Converter

SEO Tools

  • FAQ Schema Generator
  • Meta Description Generator
  • Open Graph Generator
  • Robots.txt Generator
  • SEO Site Auditor
  • SERP Preview
  • Slug Generator
  • Twitter Card Generator

Text Tools

  • Case Converter
  • Find and Replace
  • Lorem Ipsum Generator
  • Random Text Generator
  • Remove Duplicate Lines
  • Remove Extra Spaces
  • Text Diff Checker
  • Word Counter

Calculator Tools

  • Age Calculator
  • BMI Calculator
  • Compound Interest Calculator
  • Date Difference Calculator
  • Discount Calculator
  • EMI Calculator
  • GST Calculator
  • Income Tax Calculator
  • Loan Calculator
  • Percentage Calculator
  • SIP Calculator
  • Tip Calculator
  • Unit Converter

Company

  • Blog
  • About
  • Privacy Policy
  • Contact
© 2026 stakritools. All rights reserved.
  1. Home
  2. Developer
  3. URL Encoder/Decoder
Developer

URL Encoder/Decoder

Percent-encode or decode text for use in URLs. Choose Full URL encoding to preserve reserved characters, or Component encoding to escape everything.

Try:

Special Characters Reference

CharacterNameFull URLComponent
(space)Space%20%20
"Double quote%22%22
#Hash#%23
$Dollar sign$%24
%Percent%25%25
&Ampersand&%26
'Single quote''
+Plus+%2B
,Comma,%2C
/Forward slash/%2F
:Colon:%3A
;Semicolon;%3B
=Equals=%3D
?Question mark?%3F
@At sign@%40

How To Use

  1. 1.Choose a mode: Encode to percent-encode plain text, or Decode to convert a percent-encoded string back to readable text.
  2. 2.Pick a scope: Full URL keeps reserved characters like :, /, ?, and # untouched (for encoding a complete URL), while Component escapes nearly everything (for encoding a single query parameter or path segment).
  3. 3.Type or paste your text — the result updates live in the output box as you type.
  4. 4.Check the special characters reference table below the tool to see exactly how each common character is encoded under Full URL vs Component scope.
  5. 5.Copy, download, or share your result, or use Reset to start over.

Examples

Simple query value
A short phrase containing a space and an ampersand — see how Component mode escapes the & so it can't be mistaken for a query parameter separator.
Full URL with query string
A complete URL with a space and an accented character — Full URL mode encodes the unsafe characters while leaving ://, ?, and & intact.
Encoded string
A previously percent-encoded string, to see it decoded back into readable text.
Email in a URL
An email address containing '+' and '@' — both get escaped under Component mode so the value round-trips safely as a query parameter.
Unicode text
Text with accented letters and an emoji, demonstrating that non-ASCII characters encode to multi-byte percent sequences.

About URL Encoder/Decoder

What is URL Encoding?

URL encoding — formally called percent-encoding — is a way of representing characters in a URL that would otherwise be unsafe, ambiguous, or reserved for a special purpose. A URL can technically only contain a limited set of ASCII characters safely: letters, digits, and a handful of punctuation marks. Anything outside that set — spaces, non-ASCII characters like é or 中, or characters that have special meaning in URL syntax (like & or ?) — gets replaced with a '%' followed by the character's two-digit hexadecimal byte value, so a space becomes %20 and an ampersand becomes %26.

This matters because URLs are structured text: a browser or server parses a URL by looking for specific delimiter characters (? starts the query string, & separates parameters, # starts a fragment), so if your actual data happens to contain one of those characters unencoded, it gets misinterpreted as part of the URL's structure instead of as literal data. Percent-encoding solves this by escaping any character that could be confused with URL syntax, guaranteeing the receiving system reconstructs your original data exactly, character for character.

Full URL Encoding vs Component Encoding

JavaScript (and this tool) offers two distinct encoding functions because a full URL and a single piece of data within a URL need different treatment. encodeURI (Full URL mode) is meant for encoding an entire, already-structured URL — it leaves reserved characters like :, /, ?, #, &, and = untouched, because those characters are doing their job as URL syntax and shouldn't be escaped. It only encodes characters that are genuinely unsafe anywhere in a URL, like spaces and non-ASCII characters.

encodeURIComponent (Component mode) is meant for encoding a single value that will be inserted into a URL — a query parameter's value, a path segment, a form field — and it escapes nearly everything except unreserved characters (letters, digits, and - _ . ! ~ * ' ( )), including the reserved characters that Full mode leaves alone. Using the wrong mode is one of the most common URL-encoding bugs: encoding a whole URL with Component mode breaks it by escaping the protocol's // and the query string's separators.

Reserved vs Unreserved Characters

RFC 3986, the URI specification, defines two categories of characters. Unreserved characters — uppercase and lowercase letters, digits, and the four symbols - _ . ~ — are always safe to use literally anywhere in a URL and never need encoding, since they have no special syntactic meaning. Reserved characters — including : / ? # [ ] @ ! $ & ' ( ) * + , ; = — do have special meaning in at least one part of URL syntax, but that meaning only applies when they're used in their structural role.

This is exactly why the same character can be encoded differently depending on context: a / used to separate path segments should stay literal, but a literal / that happens to appear inside a piece of data needs to be encoded to %2F so it isn't mistaken for a path separator. This context-dependence is the whole reason Full URL and Component encoding exist as separate modes — there's no single 'correct' encoding for a reserved character in isolation, only a correct encoding for the role it's playing.

Common URL Encoding Mistakes

The most frequent mistake is using the wrong encoding scope: running an entire URL through Component encoding escapes the protocol separator (://), path slashes, and query string delimiters, producing a string that's no longer a valid, working URL at all. The opposite mistake — forgetting to encode a value at all before inserting it into a query string — is just as common, and can silently break the URL or let user input inject unintended query parameters if the value happens to contain an & or =.

Another frequent issue is double-encoding: running already-encoded text through the encoder again, which turns a legitimate %20 into %2520 (since the % itself gets re-encoded to %25). This typically happens when a value passes through more than one layer of URL handling that each apply their own encoding without checking whether it's already encoded. Finally, developers sometimes confuse URL encoding with representing a space as a '+' — that convention is specific to HTML form submissions, not encodeURIComponent's standard output, which always uses %20 for spaces.

FAQs

No. Encoding and decoding both run entirely in your browser using JavaScript's built-in encodeURI, encodeURIComponent, decodeURI, and decodeURIComponent functions — there's no server-side component processing your input at any point. This means you can safely encode or decode sensitive URLs, API tokens embedded in query strings, or internal application data without it ever being transmitted or logged anywhere outside your own browser tab. You can verify this by watching your browser's network tab while using the tool: there are no outgoing requests carrying your text. Even without an internet connection (after the page has loaded), encoding and decoding will continue to work exactly the same, since the entire process depends only on your browser's built-in JavaScript engine.

Full URL encoding (using encodeURI) is designed for encoding an entire, already-structured URL, and deliberately leaves reserved characters like :, /, ?, #, &, and = untouched, since those are doing their job as URL syntax. Component encoding (using encodeURIComponent) is designed for encoding a single piece of data — like one query parameter's value — and escapes nearly everything except letters, digits, and a few unreserved symbols, including those reserved characters. Use Full URL mode when you have a complete URL you want to lightly clean up without breaking its structure; use Component mode when you have one specific value that you're about to insert into a URL and need fully escaped so it can't be misinterpreted as URL syntax.

Decoding fails when the input contains a malformed percent-encoded sequence — most commonly a '%' character that isn't followed by exactly two valid hexadecimal digits, which is invalid according to the URL encoding specification and can't be unambiguously converted back to a byte value. This can happen if you paste text that contains a literal, unencoded '%' sign (common in things like discount codes or percentages) while in Decode mode, since the decoder has no way to distinguish an intentional literal percent sign from the start of a broken encoded sequence. The tool catches this and shows a clear error message rather than silently producing garbled output. If you hit this, double-check that you're actually decoding text that was properly encoded in the first place.

Spaces are encoded as %20 under both Full URL and Component modes in this tool, which is the standard, universally correct way to represent a space in a URL per RFC 3986. You may also see spaces represented as a '+' character in some contexts — that's a different, older convention specific to the application/x-www-form-urlencoded format used when HTML forms submit data, not part of the general URL-encoding standard that encodeURI and encodeURIComponent implement. The '+' convention can cause confusion because a literal '+' character in your data also needs to be encoded (to %2B) to avoid being misread as an encoded space in that specific form-submission context — one of several reasons URL encoding conventions can seem inconsistent across different systems.

Yes, but you'll typically get the best result by encoding just the parts that need it, rather than the whole URL at once. If your URL is already well-formed and you just want to escape a few unsafe characters (like a space or accented character) without touching its structure, Full URL mode is the right choice — it'll leave the ://, /, ?, and & characters alone. If you're building a URL from scratch and need to insert a value that might contain special characters into a query parameter, encode just that value using Component mode, then manually assemble it into the full URL string with the already-safe structural characters (?, &, =) added around it.

No, they're different encodings for different purposes, even though both convert data into an ASCII-safe representation. URL encoding (percent-encoding) is character-based: it looks at each character in your text and replaces only the ones that are unsafe or reserved in a URL, leaving safe characters completely unchanged. Base64 encoding is byte-based: it re-encodes the entire input, safe characters included, into a completely different representation using a 64-character alphabet, always increasing the length by roughly 33% regardless of the original content. URL encoding is used specifically for embedding data inside a URL; Base64 is used more broadly for representing arbitrary binary data as text in emails, JSON payloads, and data URIs. If you need both, apply Base64 first, then URL-encode the result, since Base64's own alphabet includes + and / characters that need URL escaping.

This tool uses JavaScript's encodeURIComponent and encodeURI functions, both of which represent a space as %20, following the general URL/URI encoding standard defined in RFC 3986. The alternative representation, a literal '+' character for spaces, comes from a different, narrower specification (the application/x-www-form-urlencoded content type used specifically for HTML form submissions), implemented by different tooling rather than encodeURIComponent. Both representations are 'correct' in their respective contexts, but they aren't interchangeable — a system expecting %20 won't necessarily decode a literal + back into a space, and vice versa, which is why it's worth checking which convention the specific system you're working with actually expects.

Yes. Non-ASCII characters — accented letters, Chinese or Arabic text, emoji, and any other Unicode character — are fully supported for both encoding and decoding, since JavaScript's encoding functions operate on the UTF-8 byte representation of your text under the hood. A single accented character like 'é' typically encodes to two percent-encoded bytes (%C3%A9), while an emoji can encode to four bytes or more, since emoji are represented by multiple UTF-8 bytes internally. This is exactly why URL encoding exists in the first place — URLs are technically restricted to a small set of ASCII characters, so any non-ASCII text needs to be converted into that safe percent-encoded byte representation before it can be safely included in a URL.

Generally, just the specific parts that contain user-provided or unpredictable data — never the entire URL as a single Component-encoded blob, since that would break its structural characters (://, /, ?, &, =). The typical, correct pattern when building a URL programmatically is to encode each dynamic value individually with Component encoding, then assemble the final URL by combining those encoded values with the literal structural characters. For example, to build a search URL, encode just the search term with Component mode, then insert it after '?q=' yourself, rather than running the whole 'https://example.com/search?q=your term' string through the encoder as one piece — that would incorrectly escape the '://' and '?' characters that need to stay literal.

The special characters reference table shows exactly how a set of commonly-encountered characters — spaces, punctuation, and reserved URL syntax characters — are represented under Full URL encoding versus Component encoding, side by side. It's there so you can quickly look up how a specific character will be transformed without needing to type it into the tool and check the result yourself, and to make the difference between the two encoding modes concrete rather than abstract: you can see directly that a character like '&' stays literal under Full URL mode but becomes %26 under Component mode, which is often the exact detail that explains why a URL is behaving unexpectedly.

Related Tools

URL Encoder/Decoder handles one specific encoding format. These related developer tools cover the others you'll run into alongside URLs and web data.

Base64 Encoder/Decoder
DeveloperEncode or decode Base64, the other common text-safe encoding — often paired with URL encoding when embedding binary data in a link.
HTML Encoder/Decoder
DeveloperEscape or unescape HTML entities like & and <, the encoding you need when displaying URLs or user text inside a web page.
JSON Formatter & Validator
DeveloperFormat and validate JSON — handy when a URL-encoded query parameter contains a JSON payload you need to inspect.
UUID Generator
DeveloperGenerate unique identifiers, often used as URL path segments or query parameter values alongside encoded data.