EDI Delimiters

Delimiter 2000What are Delimiters

In short, delimiters are characters that separate the elements of data so that one piece of data can be distinguished from another.  EDI files don’t have externally set delimiters.  This means in a pure sense, that an EDI parser may not know what the delimiters will be until it has begun to parse the file.  This may sound chaotic for someone familiar with strict delimited files.  But we need to remember that in and EDI file, the first segment is fixed position.  This is how EDI addresses the problem.

In EDI there are three delimiters, each with a separate purpose and usage.  First, there is a segment delimiter.  This is the last character of every segment.  It is sometimes referred to as the segment terminator.  Next, there is the Element delimiter.  This character separates each data element from the neighbouring data elements.  This character will most likely be the most common character in any given EDI file.  The least commonly used character is the sub-element delimiter.  Some elements have sub elements defined within them.  In my experience these location asre used rarely.  You will probably find that this character only appears once in most of your EDI files, and that is in the ISA segment where it is defined.

Where do you find the delimiters in the EDI file?

Delimiters are essential in deciphering the contents of an EDI file and getting data out of it.  Because the parser needs to know the identity of these character before it can do meaningful parsing.  It must know where to find them.  In every EDI file the first segment is the ISA segment.  This segment is always 106 characters long, counting the first character “I” as 1.  This means that if our parser grabs the 106th character it shows the segment delimiter.  And the two characters that preceded it are the element and sub-element.

Element Delimiter = Character 104

Sub-Element Delimiter = Character 105

Segment Delimiter = Character 106

What good are delimiters?

First lets say that this list of criteria will be incomplete as it is mostly based on my experiences.  Second, though I am gifted I doubt that I can imagine every possible way to create confusion.  Now here are the rules:

1.  Delimiters must be unique.  Even if you don’t use the sub-element, you still have to use a different character than used in the other delimiters.

2.  Delimiters must be single characters.  (we will talk about the exception on the Good Form section)

3.  Delimiters must be printable ASCII characters, excluding the alpha and numbered characters.  Also excluding the common punctuation.  (having the letter “B” as a delimiter would make a file unreadable.

4.  There are characters that are forbidden like the back tick.

5.  There are characters that are allowed like “*” but that are appear commonly in text fields and descriptions, so they should be avoided.

Included with my EDI Usage Specification are a set of recommended delimiters.  I set my transformer to use them as default, and encourage my trading partners to do the same.

What’s the big deal?

Delimiters are critical to having your integration function smoothly.  Selecting good delimiters and following good practices for using them help keep things from facing constant revision.  Being consistent helps your trading partners.

Looking for something else relating to EDI?  Check out the EDI Primer post

Amazon.com Widgets

Keep Reading

character1Delimiters3EDI34Element Delimiter1location2Segment Delimiter1Sub-Element Delimiter1


    December 18, 2009 - 9:57 am


    Where can I find those recommended delimeters you refer to?

    Included with my EDI Usage Specification are a set of recommended delimiters. I set my transformer to use them as default, and encourage my trading partners to do the same.

    I searched the site without success…





    December 21, 2009 - 10:57 am


    Some EDI software has a default recommended delimiter set that it preferes to use. In that case I would include those in my specification.

    If your EDI application does not care or have a prefferenece, I recommend using the ^|~ combination, or ^ for the element delimieter, | for the sub-element, and ~ for the segment delimiter.

    You can find an example and more discussion on this at my EDI Enveloping post about the ISA.

    Let me know if there are more questions, please let me know.




    October 5, 2011 - 12:59 pm

    First off, AWESOME site.

    I’m working on overhauling an MS-Access database I built over a year ago that has been generating the 856 ship notice for uploading to our trading partner. A new customer wants us to reply to their 850 purchase orders with 855 PO Acknowledgements, so it’s back to the drawing board. I’m still waiting on our interchange to get straightened out so I can look at an actual file, but their documentation examples use different delimiters, and in some cases, different delimiters in the same document.

    For example, their 850 uses the * (asterisk) in the ST, BEG, REF, PER, TD5, PO1, CTT, and SE lines, but uses a ` (backwards hyphen?) in the N1, N3, N4, SCH, and MSG segments.

    That’s impossible, right? Please confirm for me that this is probably a cut-and-paste error from someone responsible for writing a manual, not writing code, and has no idea what they’re writing.




      October 5, 2011 - 2:09 pm


      Thanks, and my condolences for having to work in MS -Access. If you are familiar with the 850 format, the 855 should be pretty straight forward.

      But the question as I understand is can a document use a different delimiter set in some segments? The answer to this question is a resounding no. The only delimiter characters allowed in the EDI file (ISA to IEA) are defined at the end of the ISA segment . (Characters 104, 105, and 106 of the ISA)

      Also, the (`) character is not a hyphen. I have always called it a “back tick” but there may be another name for it.

      It does sound like a cut and past error. Or we could call it laziness. In either case, when you actually work with the real data it needs to comply with the delimiters in the ISA.

      Thanks for the question. Please let me know if you run into any other odd information.



    Kit Peters

    December 17, 2013 - 2:56 pm

    My experience with EDI is admittedly limited, but in all the documents I’ve seen, I’ve never found one that used something other than *>~ (element separator of ‘*’, i.e. “asterisk”, U+002A, subelement delimiter ‘>’, i.e. “greater-than sign”, U+003E, and segment terminator ‘~’, i.e. “tilde”, U+007E).



      January 1, 2014 - 8:57 am

      Good for you! I’d say that the majority of people out there still using EDI are just copying the delimiter set they saw in the sample EDI files from their first trading partner, or the defaults that were in the EDI software they installed the first time.

      Some people change them because they need to for data content reasons. i.e. They have a business need to use one of the delimiter characters in their data. Or for readability needs. i.e. They are trying to read the files to find a problem they are having and the default set makes it hard to see. (These people should look at unwrapping the EDI first but…)

      Anyway, you can change the delimiters when you need to, as long as you follow the rules.


Your email address will not be published. Required fields are marked *