1. A method for redacting an electronic document (ED) having a file format, comprising: obtaining a request to redact a sensitive data item in the ED; identifying a first instance and a second instance of the sensitive data item in a markup of the ED, wherein the second instance of the sensitive data item is not redacted, not rendered, and not visible in a rendered version of the ED; and generating a redacted ED having the file format by: determining a bounding box for the first instance of the sensitive data item in the rendered version of the ED; determining a size of the bounding box; replacing a first portion of the markup comprising the first instance with a first tag specifying a neutral data item and an attribute specifying the neutral data item has the size in a rendered version of the redacted ED; and replacing a second portion of the markup comprising the second instance of the sensitive data item with a second tag specifying the neutral data item.