User Rating 0.0
Total Usage 0 times
Drop CSV file here or click to browse Supports .csv, .tsv, .txt up to 10 MB
or paste / type CSV below
0 chars
Is this tool helpful?

Your feedback helps us improve.

About

Passing raw CSV data through URL query strings or API endpoints without proper percent-encoding corrupts delimiters, breaks parsers, and produces silent data loss. Characters such as &, =, #, and + carry reserved meaning in URI syntax per RFC 3986. This tool applies encodeURIComponent to every cell value in your CSV while preserving structural delimiters and row boundaries. It auto-detects comma, semicolon, tab, and pipe delimiters and handles quoted fields with embedded newlines. The encoder processes files up to 10 MB client-side with no server upload.

Limitations: encoding is applied per-cell, not per-row. If your workflow requires encoding entire rows as single strings, flatten first. The tool assumes UTF-8 input. Non-UTF-8 files may produce replacement characters (U+FFFD) before encoding. Pro tip: if your target system expects + for spaces instead of %20, enable the "Plus for Spaces" option to match application/x-www-form-urlencoded behavior.

csv url-encode percent-encoding csv-converter encodeURIComponent rfc-3986 url-safe

Formulas

The encoding function applied to each cell value v follows RFC 3986 percent-encoding. Every octet of the UTF-8 representation that is not in the unreserved character set is replaced with a triplet %HH, where HH is the uppercase hexadecimal value of that octet.

encode(v) = encodeURIComponent(v)

The unreserved set preserved without encoding:

unreserved = A - Z a - z 0 - 9 { - , _ , . , ~ }

For each byte b of the UTF-8 encoded value not in the unreserved set:

b % toHex(b)

When "Plus for Spaces" mode is enabled, the post-processing step replaces %20 with +:

encodeform(v) = encode(v).replace(%20, +)

Where v = raw cell string value, b = individual byte of the UTF-8 representation, toHex = conversion to two-digit uppercase hexadecimal.

Reference Data

CharacterASCII CodeEncoded FormURI RoleEncoding Required?
&38%26Query parameter separatorYes (reserved)
=61%3DKey-value delimiterYes (reserved)
#35%23Fragment identifierYes (reserved)
+43%2BSpace in form encodingYes (reserved)
%37%25Escape prefixYes (reserved)
/47%2FPath separatorYes (reserved)
?63%3FQuery startYes (reserved)
@64%40Userinfo delimiterYes (reserved)
:58%3APort/scheme separatorYes (reserved)
(space)32%20Not allowed in URIYes
!33%21Sub-delimiter (unreserved in some specs)Context-dependent
'39%27Sub-delimiterYes (encodeURIComponent encodes it)
(40%28Sub-delimiterYes (encodeURIComponent encodes it)
)41%29Sub-delimiterYes (encodeURIComponent encodes it)
*42%2ASub-delimiterYes (encodeURIComponent encodes it)
~126~ (not encoded)UnreservedNo
-45- (not encoded)UnreservedNo
_95_ (not encoded)UnreservedNo
.46. (not encoded)UnreservedNo
é (U+00E9)233%C3%A9Non-ASCII (multi-byte UTF-8)Yes
(U+65E5)26085%E6%97%A5Non-ASCII (3-byte UTF-8)Yes
😀 (U+1F600)128512%F0%9F%98%80Non-ASCII (4-byte UTF-8)Yes

Frequently Asked Questions

The encodeURI function preserves URI structural characters like /, ?, &, =, #, and :. If your CSV cells contain these characters (common in URLs, addresses, or free-text fields), encodeURI will leave them unescaped, corrupting query strings. This tool uses encodeURIComponent, which encodes all characters except unreserved ones (A-Z, a-z, 0 - 9, -, _, ., ~), making each cell value safe for embedding in any URI component.
The parser implements a state machine that tracks whether it is inside a quoted field. When a double-quote (") opens a field, commas and newline characters within are treated as literal content, not delimiters. Escaped quotes ("") inside quoted fields are collapsed to a single quote before encoding. The structural delimiter and row separators are never encoded, only cell content is.
Yes. If a cell contains %20, it will be encoded to %2520 because the % character itself gets encoded. This is correct behavior per RFC 3986. If you need to pass already-encoded values through, you must decode them first (run them through decodeURIComponent) before feeding them to this tool. There is no "skip already encoded" mode because detecting partial encoding reliably is impossible without context.
The FileReader API reads uploaded files as UTF-8 by default. Bytes that are not valid UTF-8 sequences produce the Unicode replacement character U+FFFD (), which then gets encoded as %EF%BF%BD. If your source file uses ISO-8859-1, Windows-1252, or Shift_JIS, convert it to UTF-8 before uploading. Most modern text editors (VS Code, Notepad++) support re-saving with UTF-8 encoding.
The application/x-www-form-urlencoded content type (used by HTML form submissions) represents spaces as + rather than %20. Some legacy servers and PHP's urldecode function expect this format. If your target system uses standard RFC 3986 URI parsing, keep the default %20 mode. Using + in path segments (not query strings) can cause misinterpretation.
The tool accepts files up to 10 MB. Files exceeding 100 KB are processed in a Web Worker to prevent UI freezing. The preview table displays the first 50 rows for performance. The full encoded output is always complete regardless of preview limits. For files above 10 MB, split the CSV into chunks or use a command-line tool.