Step 1: Heat Carefully Over a Flame
Note that if the cord begins to melt too much, the diameter of the cord will start to increase (bubble). This may not be a problem but if you need a very clean end at the same nominal size of the cord, you want to be conservative here and not heat too much.
Step 2: Check for Adequate Heating
Step 4: Melt a Little More if Needed
If you heated the cord just enough, you'll already have a clean and fray-free end. To ensure your ends are robust, you may want to heat the tip of each end just a little more.