This work investigates film formation using polyelectrolyte complexes (PECs) of xylan and polyethylenimine (PEI). Different xylan/PEI mass ratios (from 50/50 to 90/10) and pH values (5.0 and 7.0) are analyzed and both parameters have an effect on complex size and film properties. Furthermore, the mass ratio corresponding to the neutralization charge depends on pH. When xylan/PEI mass ratios are near the neutralization charge ratio, a coacervation process is observed. In this case, separation between the coacervate and the supernatant dilute phase is possible. In the supernatant, both concentrations, xylan and PEI, depend on pH. The complex suspensions are used to obtain films by PECs casting/evaporation process. For films obtained from the whole suspension, by increasing the xylan content the stress at break is improved (up to 23 MPa for 85/15, at pH 7.0) and the strain at break is decreased (to 2.5%). When only coacervate is used to prepare films, the tensile strength is higher, reaching a value of 37 MPa for 85/15 mass ratio. Dynamic mechanical thermal analysis shows that the glass transition temperature (Tg) of the films is affected by composition. The thermoplastic behavior of a 50/50 xylan/PEI film is confirmed using a hot‐compression molding.