Nonlinear edge localized modes in a tokamak are examined using global three-dimensional resistive magnetohydrodynamics simulations. Coherent current-carrying filament (ribbon-like) structures wrapped around the torus are nonlinearly formed due to nonaxisymmetric reconnecting current sheet instabilities, the so called peeling-like edge localized modes. These fast growing modes saturate by breaking axisymmetric current layers isolated near the plasma edge and go through repetitive relaxation cycles by expelling current radially outward and relaxing it back. The local bi-directional fluctuation-induced electromotive force (emf) from the edge localized modes, the dynamo action, relaxes the axisymmetric current density and forms current holes near the edge.