CSV Encoding Converter: Shift-JIS to UTF-8 & more avatar

CSV Encoding Converter: Shift-JIS to UTF-8 & more

Pricing

from $0.03 / 1,000 converted rows

Go to Apify Store
CSV Encoding Converter: Shift-JIS to UTF-8 & more

CSV Encoding Converter: Shift-JIS to UTF-8 & more

Fix garbled CSV and text files: detects the encoding (Shift_JIS, GBK, Big5, Windows-1252, UTF-8 and more) and re-saves as UTF-8 with or without BOM for Excel, or another encoding. Unifies delimiter and line endings. Empty input = free demo.

Pricing

from $0.03 / 1,000 converted rows

Rating

0.0

(0)

Developer

Actor Factory

Actor Factory

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Features

Limited permissions

Share

Fix CSV files that show garbled text: detect the encoding and re-save as UTF-8

For anyone who opens a CSV and sees ƒTƒ“ƒvƒ‹, é, ????? or boxes instead of names: Japanese, Chinese, Korean, Cyrillic and Western European files saved in an old encoding (Shift_JIS, EUC-JP, GBK, Big5, Windows-1252 and others). Give this Actor file URLs, choose the output encoding, and get the converted file plus a public download link. The source encoding is detected for you (byte-order mark, valid UTF-8, then a statistical detector) and the result row tells you what it found and how sure it is. $0.0015 per converted file plus $0.00005 per converted row ($0.05 per 1,000 rows), header row not counted. The $5 monthly free credit covers about 97,000 rows in 1,000-row files. Failed files and the demo are free. No scraping, no API keys.

Try it free: leave the file list empty and press Start (clear the prefilled URL first). The demo converts a built-in Shift_JIS sample, is not charged and the result row carries _demo: true.

The problems it solves

  • A CSV from a Japanese, Chinese or Korean system looks like random symbols in your tool. Accounting, e-commerce, logistics and government exports are often still Shift_JIS, GBK, Big5 or EUC-KR. Convert to UTF-8 and every character comes out right.
  • Excel shows broken characters in a UTF-8 CSV. Turn on the UTF-8 BOM (or save as UTF-16) and Excel opens it correctly by double-click.
  • A legacy system only accepts Shift_JIS or Windows-1252. Convert the other way. Characters the target cannot hold are never lost silently: the file fails and names them, or you choose to replace or drop them and get the count.
  • Files from different sources use different separators and line breaks. Unify them to comma, semicolon, tab or pipe, and to LF, CRLF or CR, in the same pass.

What it does

  • Detects the input encoding: UTF-8 (with or without BOM), UTF-16/32 with BOM, Shift_JIS (Windows-31J), EUC-JP, ISO-2022-JP, GBK / GB2312 / GB18030, Big5, EUC-KR / CP949, Windows-1250 / 1251 / 1252 / 1253 / 1254 / 1256, ISO-8859 and KOI8-R. Or choose the encoding yourself when you know it.
  • Converts to UTF-8 (with or without BOM) or to any encoding in the list, including UTF-16 for Excel's "Unicode text".
  • Detects the delimiter (comma, semicolon, tab, pipe) and changes it on request; quotes are added only where needed, and line breaks inside quoted cells are kept.
  • Unifies line endings (mixed endings in one file become one style).
  • Leaves the text alone otherwise: with the delimiter on "keep" the content is re-encoded as it is, so odd quoting or extra lines are not touched.
  • Reports the detected encoding and method, a 0 to 1 confidence, row and column counts, delimiters, line endings and the number of changed characters.
  • Several files per run; each file gets its own output file and one result row.

Input example

{
"fileUrls": ["https://example.com/exports/orders.csv"],
"targetEncoding": "utf-8",
"utf8Bom": true,
"outputDelimiter": ",",
"lineEnding": "crlf"
}

Files that an earlier step produced can come from an Apify dataset: use datasetIds with items like {"fileName": "orders.csv", "contentBase64": "..."}.

Output

  • Dataset: one row per source file.
  • Key-value store: the converted file under outputKey (for example orders-utf8.csv). outputUrl is Apify's signed public link, so you can share the file without sharing your token.
  • STATS record: files converted and failed, rows converted and rows charged.
{
"source": "https://example.com/exports/orders.csv",
"status": "ok",
"detectedEncoding": "shift_jis", "detectionMethod": "statistical", "confidence": 1,
"targetEncoding": "utf-8", "targetBom": true,
"rows": 2500, "columns": 5,
"delimiterIn": "comma", "delimiterOut": "comma", "lineEndingIn": "crlf", "lineEndingOut": "crlf",
"replacedChars": 0, "inputBytes": 118204, "outputBytes": 131905, "chargedRows": 2500, "chargedFiles": 1,
"outputKey": "orders-utf8.csv",
"outputUrl": "https://api.apify.com/v2/key-value-stores/…/records/orders-utf8.csv?signature=…"
}

Limits (cannot be raised by input)

  • 50 MB per source file; 50 files per run (200 MB in total for files read from datasets)
  • A download is tried up to 3 times when the server is slow or answers with a temporary error (HTTP 429, 5xx); a clear error such as 404 is not retried. The timeout is 60 seconds per request
  • Source URLs must be public http or https links. Addresses on internal networks (localhost, private ranges, cloud metadata) are blocked, also after redirects
  • Text files only (CSV, TSV and similar). Excel workbooks, PDFs and other binary files are not converted
  • Rows are counted as records: blank lines are skipped and a quoted cell with line breaks counts once

Pricing

Pay per event: $0.0015 per converted file (event file) plus $0.00005 per converted row (event row). The header row is not counted. A 1,000-row file costs $0.0515. A file that fails (download error, no data rows, characters that do not fit) is not charged. Set a maximum charge per run to cap spend; a file that does not fit in the remaining budget is skipped whole, never cut. If none of the files fit, nothing is converted or charged and the run ends as Failed ("No file could be converted. See the dataset rows for the reason."); each skipped file's row in the dataset says "Max charge reached before this file; it was not converted." On the Apify Free plan, the $5 of monthly platform credit covers about 100,000 rows a month, enough to try it on real data.

FAQ

How does it know the encoding? First a byte-order mark, then whether the bytes are valid UTF-8, then a statistical detector. Detection is a best guess: very short files can be ambiguous, and the confidence is a rough guide, not a guarantee (when several single-byte encodings fit, it prefers the Windows ones: Windows-1252, 1251, 1253). If the output looks garbled, set sourceEncoding yourself (for example cp1250 for Central European text or koi8_r for old Russian files). The result row shows detectionMethod and confidence; set the input encoding yourself if the guess is wrong. Shift_JIS or Windows-31J? Files are read and written as Windows-31J (CP932), the variant that Windows tools produce. It includes characters such as ① and ㈱. Excel still shows broken characters. Choose utf-8 with the BOM turned on, or utf-16. What happens to characters the output encoding cannot hold? By default the file fails, nothing is charged and the error lists the characters. With "replace" they become ?, with "drop" they are removed; replacedChars says how many. Does it change my source? No. It only reads the file and writes a new one. Is the file link private? Anyone holding the signed link can download that file; it gives no access to anything else in your account.

If this Actor saved you time, a rating on the Store helps others find it.

More tools from the same developer

  • CSV to Excel Converter — convert CSV, TSV, Excel XLSX, JSON and NDJSON files or Apify datasets into each other
  • Japanese Text Toolkit — furigana, romaji, wareki dates and normalization for Japanese text
  • JSON to CSV Converter — turn nested JSON files or datasets into one flat CSV file
  • Excel to JSON — turn Excel (XLSX) sheets into JSON rows, or a JSON file into an Excel sheet
  • Dataset Transform — flatten, filter, rename and convert any Apify dataset, export CSV / JSON / JSONL with a link