We show a sharp fractional Moser-Trudinger type inequality in dimension 1, i.e., for any interval I (sic) R and p is an element of (1, infinity) there exists alpha(p) > 0 such that sup u is an element of(H) over tilde (1/p,p) (I):vertical bar vertical bar(-Delta)(1/2p) u vertical bar vertical bar L-p(I)<= 1 (integral I) (e alpha p vertical bar u vertical bar p/p-1) dx = Cp vertical bar I vertical bar, and alpha(p) is optimal in the sense that sup u is an element of(H) over tilde (1/p,p) (I):vertical bar vertical bar(-Delta)(1/2p) u vertical bar vertical bar L-p(I)<= 1 (integral I) (h(u)e alpha p vertical bar u vertical bar p/p-1) dx=+infinity, for any function h : [0, infinity) -> [0, infinity) with lim(t ->infinity) h(t) = infinity. Here,. (H) over tilde= {u is an element of L-p(R) : (-Delta)(1/2p) u is an element of L-p(R), supp(u) subset of (I) over bar}. Restricting ourselves to the case p = 2, we further consider for lambda > 0 the functional J(u) := 1/2 integral(R) vertical bar(-Delta)(1/4) u vertical bar(2) dx - lambda integral(I) (e(1/2u2) - 1) dx, u is an element of(H) over tilde (1/2,2)(I), and prove that it satisfies the Palais-Smale condition at any level c is an element of (-infinity, pi). We use these results to show that the equation (-Delta)(1/2) u = lambda ue(1/2u2) in I, has a positive solution in (H) over tilde (1/2,2) (I) if and only if lambda is an element of (0, lambda(1)(I)), where lambda(1) (I) is the first eigenvalue of (-Delta)(1/2) on I. This extends to the fractional case for some previous results proven by Adimurthi for the Laplacian and the p -Laplacian operators. Finally, with a technique by Ruf, we show a fractional Moser-Trudinger inequality on R.