Blog
Image Tools
Crop Image
Resize Image
Rotate & Flip
Compress Image
Photo Filters
Meme Generator
GIF Maker
Collage Maker
Watermark Image
Blur Image
Convert
JPG to PNG
PNG to JPG
HEIC to JPG
DNG to JPG
Image Converter
PDF to JPG
JPG to PDF
Merge PDF
Compress PDF
MP4 to MP3
Video to GIF
MOV to MP4
MP3 Converter
Video & Audio
Trim Video
Crop Video
Remove Audio
Text to Speech
Audio Cutter
MP3 Compressor
Design & Editor
Resume Builder
Design Editor
Add Text to Photo
Social Media Resizer
QR Code Generator
Signature Generator
More Tools
Word Counter
Password Generator
Random Picker
Dice Roller
Spinner Wheel
Favicon Generator
Barcode Generator
Browse All Tools

TXT to JSON Converter

Turn plain text into JSON for apps, tests and settings. Make a simple array from a list, an array of objects with a key you choose, or an object from lines written as key: value. Numbers and true or false can become real values.

100% Free
No Sign-up
Three Shapes
Typed Values
Private · Nothing Saved Online
TXT to JSON
Your Text
Input Characters—
Output Characters—
Lines In → Out—
Input Words—
Type or paste in the input box, or open a file. The result updates as you type.
JSON to TXT
TextType, paste or drop a file
JSON
Input—
Result—
Status—
Settings forYour content
Shape
Key is used for Array of objects. key: value reads lines like name: Ana or name = Ana.
Options
File Name

How to Convert Text to JSON

Quick answer: paste your text, choose Array of lines, Array of objects or key: value, then copy or download the .json.

  1. 1

    Add your text

    Paste it or open a .txt file.

  2. 2

    Pick a shape

    Array, objects or key: value.

  3. 3

    Set options

    Typed values and ids.

  4. 4

    Download .json

    Or copy it.

What You Get

Three Shapes
Array, objects, object
Typed Values
Numbers stay numbers
Your Key Name
For object arrays
Instant
As you type
Private
Nothing is uploaded
Any Device
Phone or computer

Why Convert Text to JSON?

Lists, settings and notes are easy to write as plain text, but programs, test tools, apps and no-code platforms want JSON. Converting saves you from typing brackets, quotes and commas by hand, and avoids the small mistakes that make JSON invalid. Every result here is valid JSON, ready to paste.

Three Shapes

Array of lines turns each line into one item: a list of names becomes ["Ana", "Ben", "Chen"]. Array of objects wraps each line in an object with the key you choose, such as { "text": "Ana" }, optionally with an id. key: value reads lines like discount: 20 or discount = 20 and builds one object; lines without a separator are skipped.

Typed Values

With typed values on, 20 becomes the number 20, true and false become true and false, and null becomes null, which is what most programs expect. Text that is not a plain number, such as 2026-06-01 or 007, stays text. Turn the option off to keep every value as text.

Example

The sample key: value lines become { "title": "Summer Sale", "start": "2026-06-01", "discount": 20, "active": true }. Switch to Array of lines and the same text becomes an array of four strings.

Who Converts Text to JSON?

Developers turning lists into test data and fixtures, content managers preparing dropdown options and tag lists, no-code builders feeding lists into automations, teachers preparing data for coding classes, and anyone converting simple settings into a configuration file.

Step by Step

Paste the text or open a .txt file. Choose the shape that matches your text: a plain list, a list that needs a key, or key: value settings. Check the JSON, then copy it or download a .json file. To check or reformat it later, use the JSON Formatter.

Good to Know

In key: value mode, only the first colon or equals sign on a line separates the key, so values like times (10:30) stay intact. If the same key appears twice, the last value wins. To go back, use JSON to TXT, and for spreadsheet data, CSV to JSON.

Practical Tips

Write one item per line and avoid empty lines in the middle of a list, or keep Skip empty lines on. For settings, use a consistent separator: either name: value or name = value. If a value should stay text even though it looks like a number, such as a phone number with a leading zero, it stays text automatically; for other cases, turn typed values off. Add ids when you need a stable number for each item, for example for list keys in an app. Check the result in the JSON Formatter before using it in production.

Very long lists of thousands of lines convert instantly, and nothing is stored.

Private, Free and Instant

The converter is free and handles files up to 5 MB. There is no sign-up, no limit beyond the 5 MB file size and nothing to install. Everything runs in your browser, so documents, exports and private data are never uploaded or stored. Open a file from your device or paste text from another program, then copy the result or download it with the right file extension. It works on Windows, Mac, Linux, Chromebooks, iPhone and Android.

Turning Plain Text Lines Into JSON

Many data jobs start with a list in a text file: names, emails, URLs or product codes. Converting it to JSON gives you an array that a program can read directly.

How the lines are treated

Each line becomes one string in a JSON array. Empty lines can be skipped, spaces trimmed and special characters such as quotation marks and backslashes escaped so the result is valid.

Good uses

  • Feeding a list of values into a script or API.
  • Creating sample data for tests.
  • Preparing a list for a configuration file.

Always check the result with a JSON validator if you edit it by hand. To get lines back, see JSON to TXT.

Frequently Asked Questions

Questions about text to JSON

How do I convert a list to a JSON array?

Paste the list and choose Array of lines.

Can I make objects with my own key?

Yes. Choose Array of objects and type the key name.

Can it read name: value lines?

Yes. Choose key: value; equals signs work too.

Will numbers stay numbers?

Yes, with typed values on.

How large can my file be?

Up to 5 MB of text, which covers very long documents and tables.

Is my content uploaded?

No. Everything happens in your browser on your own device. Nothing is sent or stored.