DEVELOPER UTILITY

Free Online URL Encoder / Decoder

Easily convert strings to URL-friendly percent-encoded format and decode them back. Secure, privacy-focused, and built for developers, SEO experts, and analysts.

Privacy-Focused AJAX Processing Upload .txt RFC 3986 Standard
Percent-Encoding

What is URL Encoding?

URLs use a defined syntax and character set. Characters outside the allowed representation often need to be percent-encoded when used in URL components.

The RFC 3986 Standard

URL encoding (percent-encoding) converts unsafe characters into a % followed by two hexadecimal digits. For example, a space becomes %20 and an ampersand becomes %26. This ensures that query parameters, paths, and fragments are transmitted correctly across the internet without breaking the URL structure or being misinterpreted by servers.

Privacy-Focused Processing

Your data is processed over secure HTTPS requests. We do not intentionally log or store the text you convert in our application databases. Standard server logs and transit infrastructure can occasionally capture transmission metadata, so avoid pasting highly sensitive credentials or production passwords.

Fast Conversion

Powered by PHP's rawurlencode() and rawurldecode() functions, which use RFC 3986-style percent-encoding (unlike urlencode() which encodes spaces as +).

Developer-First Utilities

Built for workflows: paste directly from clipboard, upload .txt files for file processing, copy results with one click, and track character counts in real-time. No page reloads, no friction.

URL Encoder / Decoder Tool

Built & maintained by Bhavin J. Sheth Last updated on August 21, 2026
0 characters0 bytes
Usage Limits: 60 conversions/minute per IP • Max 100KB per request. Secure HTTPS processing with rate-limiting to prevent abuse.
Encoding Map

Common Encoded Characters

Quick reference for the most frequently percent-encoded characters in URLs.

CharacterEncodedNameContext / Why it's encoded
(space)%20SpaceSpaces break URL parsing. Encoded as %20 in paths/queries (or + in form data).
?%3FQuestion MarkStarts the query string. Must be encoded if used inside a parameter value.
&%26AmpersandSeparates query parameters. Encoding prevents it from splitting your value.
=%3DEqualsSeparates key from value. Encoding keeps it inside the value safely.
/%2FSlashPath separator. Encode when passing a path as a query parameter value.
+%2BPlusOften decoded as space. Encode literal + signs to preserve them.
%%25PercentThe encoding prefix itself. Must be encoded to avoid double-encoding bugs.
#%23HashStarts the fragment identifier. Encode to pass # inside a query value.
@%40At SignUsed in mailto: and userinfo. Encode in query strings to avoid confusion.
Core Concepts

Understanding URL Encoding

Key concepts every developer should know when working with URLs and query strings.

RFC 3986 vs Form Data

RFC 3986 (rawurlencode) encodes spaces as %20. This style of percent-encoding is commonly used for individual URL path segments and query parameter values. Form data encodes spaces as +. This tool uses RFC 3986 rules.

UTF-8 Multi-byte

Non-ASCII characters (like é or 🚀) are first converted to UTF-8 bytes, then each byte is percent-encoded. The rocket emoji 🚀 becomes %F0%9F%9A%80 (4 bytes).

Safe Characters

Unreserved characters A-Z a-z 0-9 - _ . ~ are NEVER encoded. Everything else (including !, *, ', (, )) may be encoded depending on context.

Double Encoding Bug

Encoding an already-encoded string creates %2520 instead of %20. Servers decode once, leaving %20 as literal text. Always decode first if unsure of the input state.

Fragment Identifiers

The # character starts the client-side fragment (never sent to server). If you need a literal # in a query value, you MUST encode it as %23 or the browser will truncate the URL.

API Query Strings

When building API URLs manually, always encode parameter values. ?q=hello world breaks; ?q=hello%20world works. Most HTTP libraries do this automatically.

Honest by Design — What This Tool Does

This tool performs RFC 3986-style percent-encoding. Here is exactly what it does and doesn't do:

  • Encodes/decodes using RFC 3986 rules (%20 for spaces).
  • Handles UTF-8 multi-byte characters correctly.
  • Allows importing text directly from .txt files.
  • Rate-limited to prevent server abuse.
  • Does NOT use form-urlencoded (+ for spaces).
  • Is not designed to store or log your input data.

This tool does

  • Strict RFC 3986 encoding
  • UTF-8 multi-byte support
  • Upload .txt files for processing
  • One-click paste and copy
  • Live character/byte count
  • Process data with high privacy focus

This tool does not

  • Use + for spaces (form data)
  • Intentionally store or log your input data
  • Validate URL syntax
  • Fix double-encoded strings
  • Require an account
  • Send submitted text to external conversion APIs
Quick Guide

How to Use This Tool

Four steps to perfect percent-encoding.

1

Enter text

Type, paste, or upload a .txt file containing your URL or query string.

2

Choose action

Click Encode to convert to %20 format, or Decode to revert to plain text.

3

Review result

The output box displays the converted string.

4

Copy to use

Click Copy Result to paste the encoded URL into your code, API call, or browser.

Use Cases

Who Uses URL Encoding?

Common scenarios where percent-encoding is critical for web development and marketing.

Web Developers

Safely pass data in URL query parameters without breaking the URL structure. Essential for working with APIs, AJAX requests, and dynamic routing where special characters like &, =, and ? must be preserved.

SEO Specialists

Decode URL parameter values to inspect tracking values and understand how a URL is structured before making critical SEO or redirection decisions.

Data Analysts

Clean up and prepare data extracted from server logs or URLs by decoding percent-encoded characters back into their readable format for analysis in Excel, Python, or BI tools.

API Testing

When testing REST APIs, encode JSON payloads or special characters inside query strings to ensure the receiving server parses the correct nested data structure.

Tracking URLs

Build UTM-tagged URLs for marketing campaigns. Encoding ensures that spaces in campaign names or special characters in ad copy don't break the tracking parameters.

Form Submissions

Understand how browsers encode form data before sending it via GET requests. Useful for debugging why certain form inputs arrive corrupted on the server side.

Common Issues

Troubleshooting Encoding Problems

Common bugs developers encounter with URLs and how to fix them.

Double Encoding Bug

Your URL shows %2520 instead of %20, and the server reads it as literal text.

Fix: You encoded an already-encoded string. Always decode first if you're unsure of the input state, or ensure your framework only encodes once before sending.

Space as + vs %20

Server receives a literal + instead of a space, or vice versa.

Fix: Use %20 for URL paths and query strings (RFC 3986). Use + only for application/x-www-form-urlencoded POST bodies. This tool uses strict %20.

UTF-8 Character Corruption

Emojis or accented characters turn into or question marks after decoding.

Fix: Ensure both client and server agree on UTF-8 encoding. PHP's rawurldecode() handles UTF-8 bytes correctly, but your database or output layer must also be UTF-8.

Malformed Percent-Encoding

Input containing invalid percent sequences (such as `%ZZ` or a lone `%`) may produce unexpected decoding results rather than properly converted text.

Fix: Verify that the input contains correct percent-encoded patterns. A literal `%` must be encoded as %25 to prevent parsing ambiguities during conversion.

Over-encoding Paths

Your URL path /api/v1/users becomes %2Fapi%2Fv1%2Fusers and the router fails.

Fix: Only encode query parameter VALUES, not the URL structure itself. Path separators / should remain literal unless you're passing a path as a parameter value.

Hash # Fragment Loss

Everything after # disappears when the URL is sent to the server or tracked in analytics.

Fix: The # character starts the client-side fragment (never sent to server). If you need a literal # in a query value, you MUST encode it as %23.

Decision Guide

When to Encode vs Decode

Use this matrix to decide which action to take.

Scenario
What to do
Why
Building a URL with query params
Encode parameter values only.
Prevents &, =, ?, and spaces from breaking the URL structure.
Reading analytics UTM URLs
Decode URL parameter values.
Makes campaign names and encoded parameter values human-readable.
Sending JSON via GET
Encode the JSON string when placing it inside a URL query parameter.
JSON contains {, }, ", which are unsafe in URLs. Most HTTP libraries can handle this automatically.
Server received %20 literally
Decode the input on the server.
The client double-encoded, or your framework didn't auto-decode.
Passing a path as a param
Encode / when the path is passed as a query-parameter value.
Otherwise the router treats it as a new path segment.
Unsure if string is encoded
Decode first, then re-encode if needed.
Prevents the double-encoding bug (%2520).
FAQs

URL Encoding FAQs

Straight answers about percent-encoding and URL safety.

Why do I need to encode URLs?

URLs have a strict specification defining which characters are reserved, unreserved, or allowed. If you pass special characters like John & Doe without encoding, the & symbol may be misinterpreted as a query parameter separator. Encoding your parameter values ensures they are parsed correctly by the server.

Does this tool send my data to a server?

Yes, the text is sent securely over an HTTPS AJAX request to be processed using standard PHP functions. We do not intentionally write your inputs to application data logs or databases. Once processed, the data is removed from active memory.

What's the difference between urlencode and rawurlencode?

urlencode() encodes spaces as + (for form data). rawurlencode() encodes spaces as %20 (strict RFC 3986). This tool uses rawurlencode, which is correct for URL paths and query strings.

Can I encode an entire URL?

You can, but you usually shouldn't. Encoding the entire URL turns https:// into https%3A%2F%2F, which breaks the browser's ability to recognize it as a URL. This tool processes the entire string as plain-text; please encode parameter values individually.

Why did my emoji turn into %F0%9F%9A%80?

That's correct behavior! Emojis are multi-byte UTF-8 characters. The rocket emoji 🚀 is 4 bytes in UTF-8, and each byte is percent-encoded separately. Decoding it will restore the original emoji.

What is the maximum URL length?

There is no single universal URL-length limit. Browser, server, proxy, and framework limits vary. Keep in mind that percent-encoding special characters (like spaces to `%20`) expands single characters to three-character sequences, which can increase overall URL length.

Should I encode the # fragment?

No. The # character starts the client-side fragment identifier, which is never sent to the server. If you encode it as %23, it becomes part of the query string instead. Only encode # if you need a literal hash symbol inside a parameter value.

Is this tool free?

Yes, 100% free with no signup required. Rate limits (60/min per IP) prevent abuse but don't restrict legitimate developer use.

Deep Dive

Learn More About URL Encoding

Read our comprehensive guide on Hashnode.

🔗

Want to Understand URL Encoding & Decoding?

We published a beginner-friendly guide explaining what URL encoding is, why special characters become %20 and %2F values, how URL decoding works, common encoding examples, and how developers safely transmit URLs and query parameters online.

📘 Read Full URL Encoding Guide → Written by Bhavin Sheth • Founder of AllInOneTools

Related URL, Encoding & Technical SEO Tools