Convert pipe delimited text to JSON

Want to convert TXT (“|” pipe delimited text) file to JSON file?

Try Withdata Data File Converter, a desktop TXT to JSON converter for Windows, MacOS, and Linux, Convert TXT to JSON, Easy and Fast.

Download Withdata DataFileConverter Download DataFileConverter

Convert TXT (“|” pipe delimited text) to JSON

Choose TXT file -> Set JSON file -> Convert TXT to JSON

“Start a New Convert” for “TXT to JSON”.

convert TXT file to JSON file - task window

Select From “File” “TXT” To “File” “JSON”.

create JSON file by TXT file - select type

1. Open source TXT (“|” pipe delimited text) file.

Support large TXT file ( > 4GB ).

transform TXT file to JSON file - open a TXT file

Source TXT file’s content is like this:

TXT to JSON converter - source TXT file

2. Config target JSON file.

generate JSON file by TXT file - config JSON file

3. Set rows options.

convert TXT file to JSON file - summary

4. Convert TXT to JSON.

convert TXT file to JSON file - convert file

After converting, you can view the output JSON file.

convert TXT file to JSON file - view JSON file


More about TXT to JSON converter

See Video: Convert TXT (“|” pipe delimited text) file to JSON file in a few clicks

See also:

Pipe-delimited text → JSON reference

What is a pipe-delimited file?

A pipe-delimited file (also called pipe-separated values, PSV) is a plain-text file where each line is one record and a vertical bar | separates the fields. It works like CSV but uses | instead of ,, so a value that contains commas needs no quoting.

Name|Age|City
Alice|30|New York
Bob|41|San Francisco

To open it in Excel: Data → From Text/CSV, then set the delimiter to | (or Text to Columns → Other = |).

Type mapping

Value kindin Pipe-delimited textin JSON
Int12341234 (number)
Decimal1234.561234.56 (number)
Float1.234e+101.234e10 (number)
Textquoted only when it contains a pipe or a quote"text" (string)
Long textmust be quoted; line breaks inside force multi-line records"multi-line\ntext" (escaped newline inside a string)
Date2026-09-18"2026-09-18" (string)
Datetime2026-09-18 14:30:00"2026-09-18T14:30:00Z" (string)
Binarynot representable - base64 or hex string"base64:..." (string)
BooleanTRUE / FALSE, or 1 / 0 depending on the writertrue / false (boolean)
JSONthe whole JSON value quoted, with internal quotes doublednested object or array, kept as structure

Dialect differences

Both Pipe-delimited text and JSON are file formats, so what differs below is how each one chooses to represent a value.

Propertyin Pipe-delimited textin JSON
identifiersDouble quotes; a literal quote is doubled ("" )Double quotes; backslash escapes
datesConventional text: 2026-09-18 or 2026-09-18 14:30:00No date type: dates arrive as strings and the reader must p...
binaryNot supportedNot supported natively - base64 inside a string
separatorPipe "|"Braces and commas
encodingNo declaration - UTF-8 works only with a BOMUTF-8 by definition
typingNone - every field is textstring, number, boolean, null, object, array - no date type
shapeFlat table, optional header rowNested objects and arrays
ceilingNo formal limit; row count bounded by memoryWhole document is usually parsed into memory

Data File Converter without the manual work

For batch jobs, large files and scheduling use the Data File Converter converter — an offline desktop app for Windows, Linux and macOS. Free trial.


Posted

in

by