CSV URL-Encoder
Encode CSV cell values as URL-safe strings using RFC 3986 encodeURIComponent. Upload, paste, or type CSV data and download encoded output.
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.
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.
The unreserved set preserved without encoding:
For each byte b of the UTF-8 encoded value not in the unreserved set:
When "Plus for Spaces" mode is enabled, the post-processing step replaces %20 with +:
Where v = raw cell string value, b = individual byte of the UTF-8 representation, toHex = conversion to two-digit uppercase hexadecimal.
Reference Data
| Character | ASCII Code | Encoded Form | URI Role | Encoding Required? |
|---|---|---|---|---|
| & | 38 | %26 | Query parameter separator | Yes (reserved) |
| = | 61 | %3D | Key-value delimiter | Yes (reserved) |
| # | 35 | %23 | Fragment identifier | Yes (reserved) |
| + | 43 | %2B | Space in form encoding | Yes (reserved) |
| % | 37 | %25 | Escape prefix | Yes (reserved) |
| / | 47 | %2F | Path separator | Yes (reserved) |
| ? | 63 | %3F | Query start | Yes (reserved) |
| @ | 64 | %40 | Userinfo delimiter | Yes (reserved) |
| : | 58 | %3A | Port/scheme separator | Yes (reserved) |
| (space) | 32 | %20 | Not allowed in URI | Yes |
| ! | 33 | %21 | Sub-delimiter (unreserved in some specs) | Context-dependent |
| ' | 39 | %27 | Sub-delimiter | Yes (encodeURIComponent encodes it) |
| ( | 40 | %28 | Sub-delimiter | Yes (encodeURIComponent encodes it) |
| ) | 41 | %29 | Sub-delimiter | Yes (encodeURIComponent encodes it) |
| * | 42 | %2A | Sub-delimiter | Yes (encodeURIComponent encodes it) |
| ~ | 126 | ~ (not encoded) | Unreserved | No |
| - | 45 | - (not encoded) | Unreserved | No |
| _ | 95 | _ (not encoded) | Unreserved | No |
| . | 46 | . (not encoded) | Unreserved | No |
| é (U+00E9) | 233 | %C3%A9 | Non-ASCII (multi-byte UTF-8) | Yes |
| 日 (U+65E5) | 26085 | %E6%97%A5 | Non-ASCII (3-byte UTF-8) | Yes |
| 😀 (U+1F600) | 128512 | %F0%9F%98%80 | Non-ASCII (4-byte UTF-8) | Yes |