JSONL Splitter
Split a JSONL file into smaller files by line count, size or both. Presets match the OpenAI and Anthropic batch limits, and a line is never cut in half.
Runs entirely in your browser. Your file is never uploaded. How this works
Sizes are decimal megabytes, so a part set to 200 MB holds at most 200,000,000 bytes. Leave a field empty to ignore that limit.
Frequently asked questions
- How do I split a file for the OpenAI Batch API?
- Choose the OpenAI preset, which sets 50,000 lines and 200 MB per part, then add your file. Submit each part as its own batch.
- How do I split a file for Anthropic Message Batches?
- Choose the Anthropic preset, which sets 100,000 lines and 256 MB per part. Anthropic counts the size of the request, so leave extra room if your requests are close to the limit.
- Does splitting a large file use a lot of memory?
- No. Parts are references to sections of your original file, so no data is copied until you download a part. In our test, splitting a 5 GiB file took about 85 seconds and added about 120 MB of memory.
- How do I split a JSONL file on the command line?
- On Linux, split -l 50000 -d file.jsonl part- splits by lines. Use split -C 200MB to split by size without breaking a line. Write 200MB rather than 200m, because GNU split reads m as mebibytes, which is about 210 MB.