JSONL Toolkit avatar

JSONL Toolkit

Pricing

from $0.05 / 1,000 jsonl records

Go to Apify Store
JSONL Toolkit

JSONL Toolkit

Clean, validate, deduplicate, and PII-redact JSONL/NDJSON datasets for LLM fine-tuning, batch APIs, and RAG pipelines. Reports data-quality issues and estimates token counts.

Pricing

from $0.05 / 1,000 jsonl records

Rating

0.0

(0)

Developer

林 吴

林 吴

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

14 hours ago

Last modified

Categories

Security

Limited permissions

Share

Clean and audit JSONL / NDJSON datasets before they hit a fine-tuning job, an LLM batch API, or a RAG pipeline.

What it does

  • Parses JSONL, NDJSON, a JSON array, or a single JSON object
  • Repairs common LLM formatting issues: Markdown fences, curly quotes, trailing commas
  • Optional JSON Schema validation for every record, with field-level error samples
  • Optional deduplication by whole record or by a dot-path key (for example user.email)
  • Optional PII redaction for emails, phone numbers, card-like numbers, and IPv4 addresses
  • Approximate token count (characters / 4, no external tokenizer)
  • Data-quality report with parsed, invalid, duplicate, schema-invalid, and output counts

Input

FieldTypeDescription
raw_textstringRaw JSONL / NDJSON or a JSON array
source_urlstringOptional public URL to a file (max 30 MB); ignored when raw_text is set
expected_schemastringOptional JSON Schema used to validate each record
drop_invalidbooleanDrop records that fail schema validation
dedupe_bystringEmpty = no dedupe; record = whole record; or a dot path such as user.email
redact_piibooleanReplace PII with [EMAIL], [PHONE], [CARD], [IP]
estimate_tokensbooleanAdd an approximate token count to the summary
max_recordsintegerInput cap, default 20,000 (0 = unlimited)

Example input:

{
"raw_text": "{\"user\": {\"email\": \"lin@example.com\"}, \"score\": 42}\n{\"user\": {\"email\": \"lin@example.com\"}, \"score\": 42}",
"dedupe_by": "user.email",
"redact_pii": true
}

Output

Each cleaned record is pushed as one item to the default dataset. The run summary is stored in the key-value store under SUMMARY:

{
"records_parsed": 2,
"invalid_lines": 0,
"duplicates_removed": 1,
"schema_invalid": 0,
"pii_redactions": 1,
"output_records": 1,
"estimated_tokens": 12
}

Records that fail schema validation are still returned by default, so you can inspect and fix them. Set drop_invalid to remove them.

Pricing

Pay per event. You pay $0.00001 per output record, which is $0.01 per 1,000 records. Failed runs are not charged the per-record fee.

Notes

  • PII redaction is regex-based and deterministic; it reduces exposure but is not a compliance guarantee.
  • Token counts are approximate (characters / 4), not tokenizer-exact.
  • No external AI model is called, so runs are fast and reproducible.