Vietnamese Law Parser

Parse Vietnamese legal texts into Phần, Chương, Mục, Điều, Khoản, Điểm; extract number, type, dates, references, amendments; chunk for RAG.

Free tool: 20 requests per minute.

Result

Press “Run” to see the result.

Send a Vietnamese legal or administrative document as plain text (text), HTML (html) or a .docx / .txt file. The parser normalises Unicode to NFC, then builds the tree Phần → Chương → Mục → Tiểu mục → Điều → Khoản → Điểm with numbers, titles and line numbers. Text quoted inside an amending law (“Điều 10. …”) is kept as text, not mistaken for structure.

Metadata from the header: document number split into sequence / year / symbol with the type and issuer decoded (e.g. 123/2020/NĐ-CP → Nghị định, Chính phủ; administrative symbols per NĐ 30/2020 Phụ lục III), legal or administrative kind (the Law on Promulgation of Legal Documents 2025 numbers legal documents as number/year/symbol), issuer, type, title, place and date of issue, "Căn cứ" bases and the effective date found in the text. It also lists references to other documents ("Nghị định số 01/2021/NĐ-CP", "Luật Đầu tư"), article references ("khoản 1 Điều 10 của Luật Đầu tư …") and amendment markers (sửa đổi, bổ sung, bãi bỏ, thay thế…).

For retrieval-augmented generation, chunks cut the text by article (or by clause with chunk_by=clause; long articles are split by clause, then by sentence) under max_chars (or max_tokens), each chunk starting with its breadcrumb "Nghị định 123/2020/NĐ-CP > Chương I > Điều 1. …" so that the embedding keeps the context. Nothing is stored.

Use this in your code

curl -X POST "https://apibox.io.vn/v1/vn-legal-parse" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"CHÍNH PHỦ\nSố: 123/2020/NĐ-CP\nHà Nội, ngày 19 tháng 10 năm 2020\nNGHỊ ĐỊNH\nQuy định về hóa đơn, chứng từ\nChương I\nQUY ĐỊNH CHUNG\nĐiều 1. Phạm vi điều chỉnh\n1. Nghị định này quy định việc quản lý, sử dụng hóa đơn khi bán hàng hóa, cung cấp dịch vụ.\n2. Hóa đơn gồm:\na) Hóa đơn điện tử;\nb) Hóa đơn do cơ quan thuế đặt in.\nĐiều 2. Hiệu lực thi hành\nNghị định này có hiệu lực thi hành từ ngày 01 tháng 7 năm 2022 và bãi bỏ khoản 3 Điều 5 Nghị định số 51/2010/NĐ-CP.","max_chars":800}'

API documentation → Get a free API key

FAQ

Why chunk by article instead of by characters?

An article is the unit lawyers cite and that answers a question; cutting at a fixed size breaks clauses apart. Long articles are split by clause, and each chunk keeps its breadcrumb.

Does it handle amending laws?

Yes: quoted replacement text is not parsed as new articles, and the sentences that amend, supplement, repeal or replace provisions are listed in amendments.

How are tokens counted?

approx_tokens is characters / 3, a fair estimate for Vietnamese with common tokenizers; use the llm-tokens API for exact counts with a given model.