Office Document Cleaner API

Find and remove what leaks from DOCX / XLSX / PPTX before sending: author, comments, tracked changes, hidden sheets, speaker notes, links, photo GPS.

POSThttps://apibox.io.vn/v1/office-clean

Upload a Word, Excel or PowerPoint file (.docx / .xlsx / .pptx, macro-enabled variants too). action=inspect (default) reports what the recipient could see: author, last editor, company, manager, template path, editing time, custom properties, comments and their authors, tracked insertions / deletions (deleted text stays readable), hidden text, hidden sheets / rows / columns, hidden slides, speaker notes, links to other workbooks, the folder a workbook was saved in, attached template, revision ids (rsid), printer settings, VBA macros, embedded objects and pictures with EXIF / GPS. Each finding comes with a level (high / medium / low) and an English + Vietnamese message.

action=clean returns a cleaned copy: properties cleared (creation and modification dates kept; keep_title=1 keeps the title), custom properties removed, comments removed, tracked changes accepted (insertions kept, deletions and moved-from text dropped, deleted table rows removed, formatting changes accepted), speaker notes removed, links to other workbooks removed with their formulas frozen to the last values, attached template, absolute paths, rsids, printer settings and picture metadata removed, macros removed on request. Hidden sheets: hidden_sheets=keep (default), unhide or remove (formulas that used them keep their last values). Every step can be switched off (comments=0, accept_changes=0…).

Only the affected XML parts are rewritten; the rest of the package is copied unchanged and the result is re-checked (relationships, content types). The visible content does not change except for the options you choose. format=json returns the report and the file as base64. Files are processed in memory and never stored.

Markdown · OpenAPI · Postman · llms.txt

Parameters

NameInTypeRequiredDefault
filebodyfileyesThe .docx / .xlsx / .pptx file (multipart), or file_base64.
actionbody|querystringnoinspectinspect (report) or clean (cleaned file); alias mode.
formatbody|querystringnofileFor clean: file (binary) or json (report + file_base64).
hidden_sheetsbody|querystringnokeepExcel: keep, unhide or remove.
accept_changesbody|querybooleannotrueAccept tracked changes (Word).
commentsbody|querybooleannotrueRemove comments and their authors.
speaker_notesbody|querybooleannotrueRemove speaker notes (PowerPoint).
metadatabody|querybooleannotrueClear document properties, custom properties, template and absolute paths.
external_linksbody|querybooleannotrueRemove links to other workbooks (formulas keep their values).
macrosbody|querybooleannotrueRemove VBA macros (the file becomes .docx / .xlsx / .pptx).
image_metadatabody|querybooleannotrueStrip EXIF / GPS / text chunks from JPEG and PNG pictures.
keep_titlebody|querybooleannofalseKeep the document title property.

Example

curl -X POST "https://apibox.io.vn/v1/office-clean" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@./my-file"

Response

{
  "file": "hop-dong.docx",
  "bytes": 4626,
  "format": "docx",
  "macro_enabled": false,
  "metadata": {
    "title": "Hợp đồng",
    "creator": "Nguyễn Văn A",
    "last_modified_by": "Trần Thị B",
    "revision": "7",
    "created": "2026-01-01T00:00:00Z",
    "modified": "2026-11-01T00:00:00Z",
    "company": "Công ty Bí Mật",
    "template": "C:\\Users\\a\\Normal.dotm",
    "total_editing_minutes": "94"
  },
  "custom_properties": [
    {
      "name": "ClientCode",
      "value": "KH-001"
    }
  ],
  "hyperlinks": 1,
  "macros": [],
  "images": [
    {
      "name": "image1.jpg",
      "exif": true,
      "gps": true
    }
  ],
  "tracked_changes": {
    "insertions": 1,
    "deletions": 2,
    "moves": 1,
    "formatting": 1,
    "authors": [
      "Trần Thị B",
      "B"
    ]
  },
  "comments": {
    "count": 1,
    "authors": [
      "Lê Văn C"
    ]
  },
  "hidden_text_runs": 1,
  "track_changes_on": true,
  "attached_template": "file:///\\\\server\\share\\Mau%20HD.dotx",
  "revision_ids": 2,
  "risks": [
    {
      "level": "high",
      "code": "tracked_changes",
      "message": "2 deletion(s) and 1 insertion(s) are still tracked: deleted text can be read by anyone",
      "message_vi": "Còn 2 chỗ xoá và 1 chỗ chèn chưa chấp nhận: người nhận đọc được nội dung đã xoá"
    },
    {
      "level": "high",
      "code": "comments",
      "message": "1 comment(s) by Lê Văn C",
      "message_vi": "Có 1 nhận xét (comment)"
    },
    {
      "level": "high",
      "code": "image_gps",
      "message": "Picture(s) with GPS coordinates",
      "message_vi": "Ảnh có toạ độ GPS"
    },
    {
      "level": "medium",
      "code": "metadata",
      "message": "Author / company metadata: Nguyễn Văn A, Trần Thị B, Công ty Bí Mật, Sếp",
      "message_vi": "Có thông tin tác giả / công ty trong thuộc tính tài liệu"
    }
  ],
  "note": "Use action=clean to get a cleaned copy. Nothing is stored."
}

Use cases

  • Clean a contract or quotation before sending it to a client or partner
  • Publish official documents without comments, tracked changes or author names
  • Check files uploaded to a portal for hidden sheets, macros and GPS data
  • Add a "remove personal information" step to a document workflow or n8n flow

FAQ

Will the document look different?

No, only hidden information is removed. Accepting tracked changes gives the same text as "Accept all changes" in Word; hidden sheets stay unless you choose unhide or remove.

Does it work with .doc or .xls files?

No, only Open XML files (.docx, .xlsx, .pptx and the macro-enabled .docm, .xlsm, .pptm). Save legacy files in the new format first.

What is not removed?

The content of embedded files (e.g. an Excel table inside Word), hidden text runs, hidden rows / columns and custom XML parts are reported but kept, because removing them changes the document.

Related APIs

Start with 1,000 free requests every month. Get free API key →