MID code generator (manufacturer ID for CBP)
Give your broker the right MID before the entry goes back.
Type the factory name, street address line and city to get the manufacturer identification code built with the rules in CBP Directive 3550-055, with each of the five pieces explained.
Manufacturer identification code
| Piece | Value | How it was derived |
|---|
The five pieces CBP uses
The rules come from CBP Customs Directive 3550-055, dated 24 November 1986, which replaced the old telex number with a code "keylined" from the name and address on the invoice. The code runs to 15 characters at most, with no spaces, and is thought of as five pieces.
| Piece | Length | Rule in Attachment A |
|---|---|---|
| 1. Country | 2 | The ISO code for the country, such as PE for Peru. |
| 2 and 3. Name | up to 3 each | The first three characters of each of the first two words of the name; no third piece for a one word name. |
| 4. Address | up to 4 | The largest number on the street or box line, first four digits; a suite or box number counts if it is the largest. |
| 5. City | up to 3 | The first three letters of the city name, so St. Michel gives STM. |
Four general rules sit on top of the pieces. Punctuation such as commas, periods and ampersands is ignored, single character initials such as the S. in Thomas S. Delvaux Company are dropped, and the English words a, an, and, of and the are skipped. Two or more initials together count as one word, so ABC Company, A.B.C. Company and A B C Company all give ABCCOM.
Numbers split by commas or hyphens are read as one number once the punctuation is gone, so 12,34,56 Akasaka Road gives 1234. The directive also warns that some invoices print the city and its postcode before the street line, and the number to use is the one on the street line, not the city's.
Chinese invoices raise the same traps. Room and building numbers are often larger than the street number and win under the largest number rule, which is what CBP wrote, so the tool follows it rather than guessing which number the factory meant.
Worked example. The code built from the trader's letterhead
The booking. A US buyer imports a resin made by a made up factory, Guangzhou Polymer Co., Ltd., at No. 1234 Huangpu East Road in Guangzhou, but the invoice comes from the factory's Hong Kong sales company. The broker builds the code from the letterhead on the invoice and sends HK as the country with the Hong Kong office's name and street, which looks fine on paper.
The failure. That code describes an office that made nothing, so the entry points at the wrong party and the next entry through a different trader gets a different code again. The directive says entry documents with a wrong code may be returned for correction, and the choice is plain: fix the code now, or explain it later.
The fix. The buyer asks the trader for the factory's name and address, and the tool builds CN, then GUA and POL from the first two words, 1234 from the street number and GUA from Guangzhou. The code CNGUAPOL1234GUA goes to the broker, who uses it for every entry of that factory's goods.
Not sure the name on the invoice is the factory at all? The Chinese business license reader shows whether the supplier's registered business scope includes production or only sales.
Verify with CBP's own examples
Plug any line below into the form above. The output should match CBP's code exactly, because these are the nine examples printed in Attachment A of the directive.
| Inputs (country, name, street line, city) | Expected output |
|---|---|
| FR, La Vie de France, 243 Rue de la Payees, Bremond | FRLAVIE243BRE |
| VE, 20th Century Technologies, 5 Ricardo Munoz, Suite 5880, Caracas | VE20TCEN5880CAR |
| GB, The E.K. Rodgers Companies, One World Trade Center, London | GBEKRODLON |
| US, The Greenhouse, 45 Royal Crescent, Birmingham | USGRE45BIR |
| AU, Carduccio and Jones, 88 Canburra Avenue, Sidney | AUCARJON88SID |
| JP, N. Minami & Co.,Ltd., 2-6, 8-Chome Isogami-Dori,Fukiai-Ku, Kobe | JPMINCO268KOB |
| IT, Bocchaccio S.P.A., Via Mendotti, 61, Verona | ITBOCSPA61VER |
| GR, Murla-Praxiteles Inc., (no street line), Athens | GRMURINCATH |
| IT, Sigma Coy E.X.T., 1640 Delgado, Smyrna | ITSIGCOY1640SMY |
Frequently asked
What is a MID code?
The manufacturer identification code (MID) is a code of up to 15 characters that a US entry carries for each manufacturer or shipper. CBP does not issue it; the broker builds it from the name and address on the commercial invoice using the rules in CBP Directive 3550-055. The directive says entries without the code meet significant processing delays, and entry documents with a wrong code may be returned for correction.
How is the MID code built?
Five pieces with no spaces: the 2 letter ISO country code, the first three characters of each of the first two words of the company name, up to the first four digits of the largest number on the street address line, and the first three letters of the city. Punctuation, single initials and the English words a, an, and, of and the are ignored, and initials written together count as one word, so A.B.C. Company gives ABCCOM.
Should the MID use the factory or the trading company?
CBP calls it a manufacturer/shipper code, and it is used to track who made the goods, so build it from the factory's name and address, not the Hong Kong or Shanghai trader that sends the invoice. Where several company names appear on the invoice, Attachment A says to use the name and address of the corporate headquarters rather than a division or office. Ask your broker which party CBP expects for your goods when the invoice shows only the trader.
Is a Hong Kong supplier coded HK or CN?
The first piece is the ISO code of the country in the manufacturer's address, so a factory in Guangdong is CN even when its sales office sits in Hong Kong. HK belongs only on a code for a manufacturer whose address is in Hong Kong. Getting this piece wrong gives a different MID for the same factory, which splits its entry history.
What if the address line has no number or the name is one word?
Then that piece is simply left out, which the directive allows in both cases. One World Trade Center gives no number, because the rule counts digits only, and a one word name such as Bergstrom gives just BER. The code is shorter, not invalid.
Want a factory that gets the paperwork right?
Tell us the chemical, grade and quantity. A person on our team in Shanghai sends you a real, checked factory, and your first one is free.
Related tools
- PO · pdf-libLive
Purchase order maker
Branded PDF purchase order with buyer / seller blocks, line items (HS, CAS, qty, price), Incoterm-and-port shipping terms, payment terms with split-and-trigger, generated against the Sourzi PDF theme.
Open tool →
- INV · pdf-libLive
Commercial invoice maker
Customs-ready commercial invoice PDF: shipper / consignee / USCC + Tax ID, HS code per line, country of origin per line, gross + net weight, container, marks, currency, Incoterm.
Open tool →
- Packing listLive
Packing list generator
Branded PDF packing list paired with the commercial invoice. Dynamic line items with package count, dimensions, net + gross weight per row, auto-totalled. Customs-ready.
Open tool →
Sourzi shows what official files say. It is not customs or legal advice. For a binding answer, ask a licensed customs broker, a CBP ruling or an Australian Border Force Tariff Advice.
File dates and links are on Data sources.