Trim the rug's ragged edge with a pair of heavy-duty shears. You'll need a piece of cotton binding tape two inches longer than the rug's unfinished edge. After draping the binding evenly over the rug's edge, stitch it in place using cross-stitches.
To fix carpet edges that have frayed, do the following:
Using glue to mend a carpet that has frayed is one option. If you want good results, you must use the proper glue. Do not use glue that is not water-based, as exposure to water may eventually cause it to fail. A hot glue gun and glue sticks are the best tools for this.
Use a hair dryer to get rid of dents in the carpet. Spray water onto the crushed area until the carpet is thoroughly wet. When the area is wet, use the handheld device to blast it dry. Use your fingertips to fluff up the carpet fibres as they dry.